Changing remote tracking branches in git(-svn) after clone with restricted branches
When restricting remote branches to a list of 2 or three (editing the .git/config as seen in {^1}), refetching, carbage collectioning and cleaning all "refs" directories I still get a full list of all remote branches with git branch -avv
{^2}
I expected to see v2 and v3 only as branches in the list of remote branches. Any ideas how to fix this? Or is that the "git way" to present all remote branches either we might work with or not?
{^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 45开发者_StackOverflow社区67 last msg svn branch v3
remotes/v4 5678 last msg svn branch v4
remotes/trunk 6789 last msg svn trunk
git branch -D -r remotes/v1 remotes/v4 remotes/trunk
rm -rf .git/svn/refs/remotes/{v1,v4,trunk}
精彩评论