当将远程分支限制为2或3的列表(编辑{^ 1}中所见的.git / config),重新获取,回收垃圾并清理所有“refs”目录时,我仍然可以获得所有远程的完整列表分支git branch -avv
{^ 2}
我希望v2和v3仅作为远程分支列表中的分支。 任何想法如何解决这一问题?或者是“git方式”来呈现我们可能与之合作的所有远程分支?
{^ 1}
[svn-remote "svn"]
url = https://example.com/svn/repos/MyRepo/SubPath
fetch = trunk:refs/remotes/trunk
branches = branches/{v2,v3}:refs/remotes/*
{^ 2}
* master 1234 [trunk: ahead 1] last msg master
remotes/v1 2345 last msg svn branch v1
remotes/v2 3456 last msg svn branch v2
remotes/v3 4567 last msg svn branch v3
remotes/v4 5678 last msg svn branch v4
remotes/trunk 6789 last msg svn trunk
答案 0 :(得分:0)
git branch -D -r remotes/v1 remotes/v4 remotes/trunk
rm -rf .git/svn/refs/remotes/{v1,v4,trunk}