开始跟踪仅跟踪主干的git-svn仓库上的分支/标签

Hel*_*iro 8 svn git version-control git-svn

我已经开始使用git跟踪一个svn存储库,只通过克隆它的trunk目录.现在我想跟踪其他东西,但我不想再次克隆它只是为了使用,--stdlayout因为它需要很长时间才能下载并且我已经在本地拥有大部分代码.如何更改存储库布局以匹配svn trunk/branches/tags方案而无需再次克隆?

eph*_*ent 9

.git/config:

[svn-remote "svn"]
        url = svn://host/project/trunk
        fetch = :refs/remotes/git-svn

.git/config:

[svn-remote "svn"]
        url = svn://host/project
        fetch = trunk:refs/remotes/git-svn
        branches = branches/*:refs/remotes/*
        tags = tags/*:refs/remotes/tags/*

现在跑git svn reset -r1 -p; git svn fetch; git svn rebase.

不,它与git svn clone重新做的没什么不同- 添加分支意味着git可以看到更多的合并,这意味着内容git跟踪已经改变,所以git-svn必须重新生成一切.