I'm a newbie to Git. I'm exploring one-way one-time migration of Git repository to TFS (with history). I'm looking into plugin 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? Any examples would be great!! Thank you!!
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I was able to do it on test repository. Big thanks to Ivan Danilov. Here are exact steps:
- Download zip
- Unblock (right click file->properties->unblock) downloaded files (win 7 for me)
- Copy to C:\Program Files (x86)\Git\bin
- Now you should be able to run Git tfs commands.
- Create empty TFS target folder (assuming you are migrating to empty folder)
- Bind TFS to Git repository and then upload Git changes to 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. 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.