簡體   English   中英

從TFS遷移到GIT,具有多個分支及其歷史記錄

[英]Migrate to GIT from TFS with multiple branches and their history

C:\\>git tf clone https://companyname.visualstudio.com/DefaultCollection $/companyname/Main OldTFS --deep

這只能讓我獲得主要的分支歷史。 那是git tf

C:\\>git tfs clone https://companyname.visualstudio.com/DefaultCollection $/companyname/Main --with-branches

在其中一個合並更改集中獲取少量分支后,這會失敗, Please report this case to the git-tfs developpers! (report here : https://github.com/git-tfs/git-tfs/issues/461 )說明Please report this case to the git-tfs developpers! (report here : https://github.com/git-tfs/git-tfs/issues/461 ) Please report this case to the git-tfs developpers! (report here : https://github.com/git-tfs/git-tfs/issues/461 ) git branch給了我這個

Release/20120719.1
Sprint/Sprint044
Sprint/Sprint045
Sprint/Sprint047
Sprint/Sprint048
Sprint/Sprint049
Sprint/Sprint050
*master

我已經分支到Sprint085和很多發行分支。 那是git tfs

有沒有辦法使用git tf ,我可以獲取一些正確創建合並提交的其他分支,以便我可以正確地看到歷史記錄?

免責聲明:我是那個為git-tfs添加分支支持的人...

忘了git tf它不支持分支。

在其中一個合並變更集中取出幾個分支后,這會失敗,說我應該通知他們詳細信息,以便他們可以改進。

也許你應該遵循git-tfs給出的鏈接;)

鏈接就是這個 在那里的消息中,您被告知正在進行工作以獲得更好的分支支持。

你應該嘗試一下。 它具有非常好的形狀並且允許支持其他2個分支模式:分支重命名和無基礎合並。 有了這兩個最后的模式,我希望我們可以支持所有的分支模式(但是因為TFS非常令人驚訝 - 意思不好 - 而且很麻煩,我無法保證!)

如果您不能支持所有分支機構,它仍將是手動方式! 但很長:

  • 僅克隆另一個存儲庫中的分支
  • 在主存儲庫中獲取此分支
  • 使用移植物將你的分支鏈接到它的父分支(你應該在TFS中找到它。祝你好運,因為TFS非常糟糕!)
  • [可選]使用git filter-branch使鏈接永久化。

PS:也許你甚至可以編寫一個小腳本來自動完成所有這些......

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

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