[英]git-svn branching
我正在使用帶有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.
我應該如何指定目標,我無法弄清楚這一點,手冊頁也不是那么清楚。
您有多個(或沒有)來自svn的目錄標記為分支的位置。 看看你.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中分支行的目錄之一。
如果我正確閱讀git svn
手冊頁 :
git svn <command> [options] [arguments]
,你應該鍵入:
git svn branch -m "message" someFeature
代替:
git svn branch someFeature -m "message"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.