I've got a task this week to move a fairly old project from an internal TFS instance (using TFVC) to Visual Studio Team Services using Git.
I tried using the steps from this link (import-from-tfvc), but then I realized half way through that my project wasn't in VSTS. So no good.
I started following the steps on https://www.visualstudio.com/learn/migrate-other-systems-to-git/, but pretty early I realized that it wouldn't keep any history then what would be the point?
3rd Attempt - Success
I had only one issue while trying to run the command
git-tf which was "Git-tf unable to find required JAR" where I quickly fixed by following an answer in this post.
Other than that happy days with these steps:
- Create Team Project on VSTS using Git
- Install Git-TF
- Follow steps on http://gittf.codeplex.com/ to configure it
- Back to console
//Clone TFS repository. This will take a few hours depending on the size of the repository git-tf clone http://yourtfsserver:8080/tfs/colletionname $/TeamProjectA/Main --deep //Navigate to the just created folder cd TeamProjectA/Main //Add new remote repository git remote add origin https://example.visualstudio.com/DefaultCollection/_git/TeamProjectA //Push all git push -u origin --all
If keeping the work items as well as code history is your requirement then you might want to check the video below from Danijel Malik and Adam Cogan entitled Migrating from TFS to the Cloud... Without Losing Your Mind and also Rules to Better TFS Migration to the Cloud**Video: Migrating from TFS to the Cloud... Without Losing Your Mind**
Hope it helps. It will definitely help me in the future if I need to do it again.