使用git svn clone克隆复杂的svn分支设置

时间:2018-01-10 20:05:04

标签: git svn git-svn git-clone

在我们的svn回购中,我的分支位于/branches。我的分支也位于/branches/subdir1/branches/subdir2。我试过传递--branches=/branches,但这并没有得到subdir1& subdir2。我尝试过branches=/branches branches=/branches/subdir1 branches=/branches/subdir2,但仍然会对subdir1& subdir2作为自己的分支。我也试过了branches=/branches/*/*但是有类似的行为。我怎样才能获得所有分支?

1 个答案:

答案 0 :(得分:0)

我需要来回走动一段时间,svn2git对我来说不是一个选择。我想到了。您可以通过在大括号内使用逗号分隔列表来指定特定分支。所以我的配置行有这些相关的行:     branches = branches/{branch1,branch2,branch3}:refs/remotes/*     branches = branches/subdir1/*:refs/remotes/*     branches = branches/subdir2/*:refs/remotes/*