So it has begun. We have been using TFS at work for 2+ years and the time has come to move off of TFS and over to GitHub (we have a few reasons, most of which I am going to avoid for this post as they do not add any real value). Normally when you are going from one system to another you have to run some sort of conversion, this is kinda true here, but not 100%. In this case we are going to be doing a conversion and a publication, both of which are simple.
The basic idea of what we are going to be doing is:
Clone from TFS –> Push to GitHub –> have a beer :)
Really, moving from TFS to GitHub (or git in general) is really easy, but does involve a few steps
- Install Chocolately
- Install GitTFS (chocolately package) – this is a tool which allows you to use git syntax w/ your TFS repository
- Open up a Visual Studio Command prompt
- CD into the directory you whish to clone into
- Clone your TFS repo locally via Git TFS
There are 2 different ways to do this, you can do a full clone which includes all your commit history or you can do a quick-clone which does not
Clone (this could take a really long time, like hours so be warned)
git tfs clone http://[YourTFSServerHere]:8080/tfs/DefaultCollection $/[NameOfFolderHere]
git tfs quick-clone http://[YourTFSServerHere]:8080/tfs/DefaultCollection $/[NameOfFolderHere]
- Create your repository on GitHub (I found this was just the simplest way)
- Go back to your command prompt (ensure you are in the directory that has your files)
- Do a git push via
git push http://github.com/[GitHubAccountNameHere]/[RepositoryNameHere] master
Make sure you put master as you need to tell it what branch to do the push to.
- Go verify your code is in GitHub
- Your done
As you can see getting all your files out of TFS and into GitHub is pretty simple, but does involve a few steps (and possibly a few hours depending on how much commit history you have in TFS).
Hope this helps,
Till next time,
09-09-2012 6:17 AM