简体   繁体   English

TFS(2015) 到带有历史和分支的 GIT 迁移

[英]TFS(2015) to GIT migration with history & branches

I am trying to migrate a TFS team project under team project collection to GIT version control.我正在尝试将团队项目集合下的 TFS 团队项目迁移到 GIT 版本控制。 My requirement is to move the history & the branch as it is in TFS.我的要求是像在 TFS 中一样移动历史记录和分支。 I am able to move history but not the branches.我可以移动历史,但不能移动分支。 The branches are getting created as folders, but i want it as branches in GIT also.分支被创建为文件夹,但我也希望它作为 GIT 中的分支。 Our TFS version is 2015. Below are the commands i used.我们的 TFS 版本是 2015。以下是我使用的命令。

git tfs clone https://net.com:50443/tfs/Collection "$/Project" --branches=all

git remote add TestRepo https://net.com:50443/tfs/Collection/_git/TestGit

git push -u TestRepo --all 

Can someone suggest the right way of getting the branches in GIT.有人可以建议在 GIT 中获取分支的正确方法吗?

You cloned too high in the TFS path (like git-tfs warned you)...您在 TFS 路径中克隆得太高了(就像 git-tfs 警告过您一样)...

Instead of cloning "$/Project", you should clone the main branch which should look like something like "$/Project/myMainBranch"... and pray that your TFVC history is entirely supported by git-tfs!您应该克隆主分支,而不是克隆“$/Project”,它应该看起来像“$/Project/myMainBranch”……并祈祷您的 TFVC 历史完全由 git-tfs 支持!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM