将单个分支从SVN迁移到Git

时间:2015-09-18 12:47:52

标签: git svn

我的旧SVN存储库中有5个分支,我只希望将一个分支迁移到新的Git存储库。

要迁移的SVN分支的路径:http://xx.xxx.xx.xx/svn/myRepo/branches/firstBranch

当我运行此命令时:

git svn clone http://xx.xxx.xx.xx/svn/myRepo --no-metadata --stdlayout  --branches branches/firstBranch --prefix origin/ --trunk .

...它检查完整的存储库。但我需要在我的Git存储库中获得一个分支。

1 个答案:

答案 0 :(得分:3)

您不需要--stdlayout--branches。只需git svn clone http://xx.xxx.xx.xx/svn/myRepo/branches/firstBranch .

相关问题