[英]Git: Discard all changes on remote branch and push local changes without force push
[英]Push temporary git branch to remote without files or changes
我們有一個 git master
分支。 我們從這個分支創建功能分支並將這些功能分支合並到主分支中。
我們現在需要一個“臨時”分支,從那里我們分支出一些功能分支。 這些功能分支將合並到temporary
分支中。
我如何將新的“臨時”分支(沒有任何文件或更改)推得太遠,以便其他人也能夠從該分支分支出來?
如果我正確理解你的問題,這些是步驟:
git checkout master
git checkout -b temporary
git push -u origin temporary
然后,任何開發人員都應該這樣做:
git fetch
git checkout temporary
git checkout -b myNewBranch
<< user does things >>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.