[英]SVN to git conversion: branch formation
我的SVN存儲庫如下所示:
branches/
tags/
trunk/
在branchs文件夾中,我具有以下內容:
branches/dev1/example1
branches/dev2/example2
branches/dev3/example3
我想在轉換過程中將example1
, example2
和example3
作為git分支。
git svn clone https://myurl -T trunk -b branches/dev1/example1 -b branches/dev2/example2 -b branches/dev3/example3 -t tags -A authors-transform.txt
我正在進入Linux的無限循環。 如果我不提供其他分支的選項,而只給出-b branches
的話,它可以正常工作(盡管沒有形成所需的git分支!)
有人可以建議在git轉換過程中建立分支的方法嗎?
解:
git svn clone https://myurl -T trunk -b branches/dev1 -b branches/dev2 -b branches/dev3 -t tags -A authors-transform.txt
你近了!
git svn clone https://myurl -T trunk -b branches -t tags -A authors-transform.txt
選項-b
接受目錄,並將其中的每個子目錄(在您的情況下為dev1
, dev2
和dev3
)都視為一個分支。 您無需列出所有分支,只需傳遞-b branches
。
-T trunk -b branches -t tags
可以縮寫為-s
或--stdlayout
:
git svn clone https://myurl -s -A authors-transform.txt
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.