简体   繁体   English

Git to TFS 2008单向迁移(有历史记录)

[英]Git to TFS 2008 one way migration (with history)

I'm a newbie to Git. 我是Git的新手。 I'm exploring one-way one-time migration of Git repository to TFS (with history). 我正在探索将Git存储库单向一次性迁移到TFS(带历史记录)。 I'm looking into plugin git-tfs . 我正在研究插件git-tfs I couldn't find any help/wiki/blog on this particular scenario. 我在这个特定的场景中找不到任何帮助/维基/博客。 Can I use git-tfs checkin or git-tfs clone command in this case? 在这种情况下,我可以使用git-tfs checkin或git-tfs clone命令吗? Any examples would be great!! 任何例子都会很棒!! Thank you!! 谢谢!!

I was able to do it on test repository. 我能够在测试库上做到这一点。 Big thanks to Ivan Danilov. 非常感谢Ivan Danilov。 Here are exact steps: 以下是确切的步骤:

  1. Download zip 下载zip
  2. Unblock (right click file->properties->unblock) downloaded files (win 7 for me) 取消阻止(右键单击文件 - >属性 - >取消阻止)下载的文件(对我来说赢7)
  3. Copy to C:\\Program Files (x86)\\Git\\bin 复制到C:\\ Program Files(x86)\\ Git \\ bin
  4. Now you should be able to run Git tfs commands. 现在你应该能够运行Git tfs命令了。
  5. Create empty TFS target folder (assuming you are migrating to empty folder) 创建空TFS目标文件夹(假设您要迁移到空文件夹)
  6. Bind TFS to Git repository and then upload Git changes to TFS. 将TFS绑定到Git存储库,然后将Git更改上载到TFS。 (Run commands in sequence): (按顺序运行命令):
   git tfs init http://server:8080/tfs/collection $/project -d 
   git tfs pull
   git rebase tfs/default
   git tfs rcheckin

Please note rebase is the key. 请注意rebase是关键。 It could be more complicated if you have branches etc and I haven't tried those scenarios. 如果你有分支等可能会更复杂,我没有尝试过那些场景。

Please see this link and this link for more details. 有关更多详细信息,请参阅此链接和此链接

混帐TFS

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

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