幾個星期前,我將一個Subversion版本庫轉換爲Git。我留下了一堆我不再需要的分支,但無法刪除。更糟糕的是,在試圖擺脫svn /任何分支的過程中,我現在發現自己與「origin」分支重複。這是我的分支列表的片段:如何刪除git zombie分支?
% git branch -a | egrep 'svn/partial|master'
* master
origin/master
origin/origin/master
svn/partial
remotes/origin/master
remotes/origin/origin/master
remotes/svn/partial
我似乎能夠刪除了svn /部分分支,而不是遙控器/ SVN /部分分支:
% git branch -D svn/partial
Deleted branch svn/partial (was 373a64c).
% git branch -D remotes/svn/partial
error: branch 'remotes/svn/partial' not found.
如果我的git取,svn/partial被重新創建,並且我得到另一層「origin /」分支:
% git push
Everything up-to-date
% git fetch
From .
...
* [new branch] origin/origin/origin/master -> origin/origin/origin/master
...
* [new branch] svn/partial -> svn/partial
Yikes!他們乘象符段:
% git br -a | egrep 'svn/partial|master'
* master
origin/master
origin/origin/master
origin/origin/origin/master
svn/partial
remotes/origin/master
remotes/origin/origin/master
remotes/origin/origin/origin/master
remotes/svn/partial
我該如何解決這個問題?
可能的重複[如何在本地和GitHub中刪除Git分支?](http://stackoverflow.com/questions/2003505/how-do-i-delete-a-git-branch-both-locally- github) – 2013-02-14 21:00:23