我正在使用带有svn存储库的git,一切都很顺利。我使用git完成了所有分支,所以我没有在svn上进行分支,而是使用git进行了分支,并将这些分支推送到了一个单独的位置。然后,当需要时,我从分支提交更改。
但现在我想创建一些我尝试过的svn上实际存在的分支:
$ git svn branch someFeature -m "message" ,我得到了这个:
$ git svn branch someFeature -m "message"
Multiple branch paths defined for Subversion repository.
You must specify where you want to create the branch with the
--destination argument.我应该如何指定目的地?我搞不清楚这一点,手册页也不是很清楚。
发布于 2010-06-05 20:17:43
您在svn中有多个(或没有)目录被标记为place for branches。查看您的.git/config文件,会有类似这样的部分:
[svn-remote "svn"]
url = file:///someurlto/svn
fetch = trunk:refs/remotes/trunk
branches = branches/*:refs/remotes/*
branches = branches2/*:refs/remotes/*分支将有多个条目。(或者,如果没有任何分支条目,第一行应该使用标准的SVN repo布局。)
因此,在分支时,您必须指出应该在哪个目录中创建分支:
git svn branch someFeature -m "test" --destination branches2其中,最后一个元素是.git/config中分支行的目录之一。
https://stackoverflow.com/questions/2974016
复制相似问题