簡體   English   中英

SVN轉換為git:分支形成

[英]SVN to git conversion: branch formation

我的SVN存儲庫如下所示:
branches/ tags/ trunk/

在branchs文件夾中,我具有以下內容:
branches/dev1/example1 branches/dev2/example2 branches/dev3/example3

我想在轉換過程中將example1example2example3作為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接受目錄,並將其中的每個子目錄(在您的情況下為dev1dev2dev3 )都視為一個分支。 您無需列出所有分支,只需傳遞-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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM