You may have noticed a few weeks back that Microsoft has released an open source project named Git-Tf which is very similar to Git-Tfs in that it allows you to have a local git repository that can push/pull from a remote TFS server.

The first question? Why would Microsoft do this if Git-Tfs already exists and does the job? The answer is pretty simple. The Git-Tfs project is windows only, and Microsoft wanted a cross platform solution so that linux, Mac/XCode developers can also put their source into TFS.  Microsoft even talked to the git-tfs team first before building their own version and then open sourcing it.

One of the problems with the initial versions of git-tf was that it didn’t talk to because of the requirement to login using a Live Id. That’s all changed in recent days so here’s how to get it working:

Step 1 – Enable Basic Auth on your account

This was an update in the TFSPreview service made at the end of August that allows you to set up basic auth credentials for your account. You will need to enable it.

Go to your profile and turn it on:


Next, go to the credentials tab and enable the alternate credentials.


Step 2 – Update Git-Tf (if required)

You may need to update your git-tf version if you already have it installed.  You should be running version or later.

Use git tf --version to check what you are currently running and you can get the latest version from the Microsoft Downloads page.

Step 3 – Clone your repository

This is pretty simple.  Simply use the git tf clone command and point it at your tfspreview account.

Here’s me cloning one of my projects


And then you’re done! You’ve now got yourself a local git repository connected to tfspreview and everything is all set to go!

Fantastic :-)