這是我的git工作流程。清理舊的遠程git分支
我從兩臺不同的計算機(A和B)工作,並將常用的git遠程存儲在收存箱目錄中。
假設我有兩個分支master和devel。兩者都在追蹤他們的遠程對手的起源/主人和起源/發展。
現在同時在計算機A上,我刪除支線devel的 - 本地和遠程的 - 如下:
git push origin :heads/devel
git branch -d devel
現在,如果我在計算機A上做git branch -a
,我得到
master
origin/HEAD
origin/master
我現在去電腦B.做git fetch
。我可以刪除當地的Devel分支
git branch -d devel
但我無法刪除遠程devel分支。
git push origin :heads/devel
error: unable to push to unqualified destination: heads/proxy3d
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
fatal: The remote end hung up unexpectedly
在做git branch -a
仍然列出遠程分支的起源/發展。
如何清理機器B的devel遠程入口?
我曾試過一個人告訴我,Dropbox文件夾中的git存儲庫有點脆弱(但沒有額外的細節)。 – 2013-04-19 09:23:36
@ThorbjørnRavnAndersen可能是因爲您必須等待以確保它在您提交時完全同步,然後才能確保在另一臺計算機上使用它是安全的(並且即使此時還需要另一個同步)。 – ataulm 2013-08-01 14:54:08