So it’s pretty straightforward to transfer TFS code, with history, into Git. This post shows a simple way to ‘clone’ TFS into a new Git repo.
1) Install Chocolatey
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
2) Use Chocolatey to install GitTfs. Close Visual Studio first, though.
Then restart the command window.
3) Choose a branch and get cloning;
git tfs clone http://tfsserver:8080/tfs/TfsInstanceName $/TeamProjectName/Path/To/Branch
That should sort you out.
Is it me, or has Mercurial well and truly lost the race against git?
Second, I just did a very quick scan for git and mercurial integration for Visual Studio. Microsoft are releasing a git extension in their next service pack (Visual Studio 2012 Update 2). Mercurial integration packages like VisualHG aren’t even compatible with Visual Studio 2012.
The disappointing thing here is that GitHub’s policy on private repos is so much tighter than BitBucket. In BitBucket, I get unlimited free private mercurial and git repos. In GitHub I have to pay to get any. I understand why GitHub needs to charge. Of course I do. It’s just that I’ve been avoiding Github because I have a lot of stuff that’s not fit for public consumption but which I want under source control.
Ah, well. First-world problem.