Microsoft acquired GitHub, and everyone has an unlimited number of private repositories. This reason alone makes me want to move all my project and source code to GitHub.
- 1. A bit of history
- 2. Required tools
- 3. Migration steps
In around 2012, developers don’t have many choices in where to store their code for free. Sure, you can use GitHub, but it limits the number of private repositories and the number of collaborators. The obvious choice at that time was
Visual Studio Online, or today
Azure DevOps. The only source control system it is provided is Team Foundation Server (TFS).
Today, 9.99 over 10 developers will choose
tfs, and we need a way to migrate from TFS, with history, to git.
Alternatively, you can install git-tf with Chocolatey:
choco install gittfs
git-tfs clone https://your\_organization.visualstudio.com/ $/your\_project\_name
If your project name contains whitespace, just put the whole name in the quote mark
git-tfs clone https://your\_organization.visualstudio.com/ "$/your project name"
This command will clone the project to the folder you run the command
Now the project is like any other git project, with a
.git folder. You should add a
.gitignore file to prevent commit unwanted files.
.gitinore file here: Visual Studio Git Ignore
The final step is to push code to your favorite git service.