Microsoft acquired GitHub, and every one have unlimited private repository. This reason alone make 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 much choices in where to store their code for free. Sure you can use GitHub, but it limit the number of private repository and number of collaborators. The obvious choice at that time was
Visual Studio Online, or today
Azure DevOps. The only source control system it’s 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 contain whitespace, just put the whole name in quote mark
git-tfs clone https://your\_organization.visualstudio.com/ “$/your project name”
This 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.