Migrate from Team Foundation Version Control TFVC to Git
suggest changeYou can migrate from Team Foundation Version Control to Git with an open source tool called Git-TF. The migration also transfers existing history by converting TFVC check-ins to Git commits.
To put your solution into Git by using Git-TF follow these steps:
Download Git-TF
You can download (and install) Git-TF from Codeplex: Git-TF @ Codeplex
Clone your TFVC solution
Launch powershell (win) and type the command
git-tf clone http://my.tfs.server.address:port/tfs/mycollection '$/myproject/mybranch/mysolution' --deep
The --deep switch tells Git-TF to copy check-in history. You now have a local Git repository in the folder where you ran the clone command.
Cleanup
- Add a .gitignore file. If you are using Visual Studio the editor can do this for you, otherwise you could do this manually by downloading a complete file from github/gitignore.
- Remove TFVC source control bindings from the solution (remove all
*.vsssccfiles). You can also edit the solution file and remove theGlobalSection(TeamFoundationVersionControl)…EndGlobalSectionblock.
Commit & Push
Complete your conversion by committing and pushing your local repository to your remote.
git add .
git commit -a -m "Converted solution source control from TFVC to Git"
git remote add origin https://my.remote/project/repo.git
git push origin master
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents