Moving from TFS to git while maintaining changeset and branch history

January 14, 2015 - 12:00 am

So, you’re also looking to move from TFS to git? Lucky you! 🙂 There’s a Git <-> TFS bridge available to help you out with that; but the latest release doesn’t fully support branching, so if you need branches as well you’ll need to grab the code from this pull request instead.

In order to grab it, you can do the following..

git clone C:/workspace/git-tfs (or wherever you want to store it locally)
cd c:/workspace/git-tfs
git remote add pmiossec
git fetch pmiossec
git checkout pmiossec/rename_branch_and_add_file

Now you just need to load up the GitTfs.Sln in Visual Studio. Unload the projects that don’t match your installed Visual Studio version. Build the rest. Grab the binaries from GitTfs/bin/Debug. You’ll also need a dll from lib\libgit2sharp\LibGit2Sharp\bin\Debug\NativeBinaries. (amd64 for 64 bit CPU, x86 for 32 bit CPU).

Now you should be good to go. Verify that you’re using the correct version by using git-tfs version. It should be

To clone your TFS repository, use this:

git-tfs clone --username=<USER> --password=<PASSWORD> <TFS_URL> <TFS_BRANCH> <LOCAL_PATH>

For example.

git-tfs clone --username=Emil --password=c0deb0ss $/AwesomeProject/Main C:/workspace/awesome-project --with-branches

Any questions? Just tweet me at @EKantis and I’ll get back to you. Cheers!

Some meta and GitHug

November 25, 2013 - 10:22 pm

Hello! Been a while.. Apparently it’s quite hard to create content developer that actually feels useful to someone.. 🙂 I’m looking forward to posting some info in a few weeks when we’ve launched the projects I’m working on.

Until then I thought I’d just let you all know about this great thing that helped me become more fluent with git. Basically it’s an interactive tutorial that gives you a set of 40-ish tasks to complete, along with hints and automated validation of your solution. Great way of getting to know the basics of the more powerful commands!