基於下面的答案命中。我找到了解決方案。git-svn:如何爲SVN的子項目創建標籤/分支
克隆SVN:
$ git svn clone http://foo.net/code/design --trunk=trunk/proj1 --tags=tags/forProj1 --branches=branches/forProj1 localProjName
,然後將該代碼可以通過簡單的命令來創建
$ git svn tag -n -m "test tag" test_v1
注:這也可以通過黑客的.git/config來完成在本地git克隆中將其更改爲
[svn-remote "svn"]
url = http://foo.net/code/design
fetch = trunk/proj1:refs/remotes/trunk
tags = tags/forProj1/*:refs/remotes/tags/*
branches = branches/forProj1/*:refs/remotes/branches/*
原始的問題
我的SVN服務器結構是這樣的:
http://foo.net/code/design/ |-- trunk/ | |-- proj1 | |-- proj2 |-- tags/ | |-- forProj1 | |-- forProj2 |-- branches/ | |-- forProj1
我簽出proj1:
$ git svn clone http://foo.net/code/design/trunk/proj1 proj1
和我想創建proj1一個標籤,並把http://foo.net/code/design/tags/forproj1
下這個標籤我想:
$ git svn tag -m "test tag for proj1" test_tag_1
我得到錯誤信息說我已經把「--destination」。但我不知道目標選項應該是什麼樣子?
任何人都可以給我一個提示我怎麼能創建一個標籤或分支基於上述情況?
謝謝。
我試過你的解決方案。該命令沒有輸出。所以我仍然不知道 - 目標選項應該是什麼。 –