Demystifying Microsoft’s Git Offering

Although Microsoft is definitely late to the distributed version control (DVC) game, they’re pretty much in the game now and their DVC offering is only getting better. In order to provide distributed capabilities within its current version control offering, Team Foundation Server, the Visual Studio team had to make a decision: build something brand new (possibly proprietary) or build on one of the standard DVC platforms. They decided to go with the latter and build upon Git. A great decision as far as I am concerned.

But, Before That…

Before we get to the Visual Studio offering, let’s take a look at CodePlex. If you’re not familiar with CodePlex, it is Microsoft’s free open source project hosting site. Here, you can create projects to share with others around the world as well as download open source software. In March, 2012, Microsoft made available the capability to create Git-based repositories within CodePlex.  With this, developers now have the capability of choosing between a centralized version control repository, a la TFS, or a distributed version control repository via Git (or Mercurial, which actually came before Git but isn’t nearly as popular).

Moving Forward

Fast forward about ten months and Microsoft announces Git support for Team Foundation Service (TFService, their hosted TFS offering). This update provides a 100% compatible Git repository option for TFService. Not only does this provide typical Visual Studio developers with a great DVC option for TFService it also makes the TFService option much more attractive for non-Visual Studio developers by providing simpler integration for tools such as Xcode.

Along with Git in TFService, Microsoft also provided the Visual Studio Tools for Git. This extension provides Git integration within Visual Studio 2012. If you plan to utilize Git-based repositories within Visual Studio 2012 then you will need to install this extension. Something to note is that this extension allows Visual Studio to work with any standard Git repository such as GitHub, not just TFService.

Still Some Confusion

One of the biggest Git-/Visual Studio-related questions I get today is, what is the difference between the Visual Studio Tools for Git and Git-tf?

The Git-tf command line tools were announced in August, 2012 with the intent of giving developers the capability of using a local Git repository for development that could then be synced up with a TFS repository. In simple terms, you can use Git-tf to clone TFS into a local repository which could then sync your local commits back into TFS. Essentially, it provided a bridge between TFS and clients and/or developers that preferred to work with (or could only work with) Git. Until now, this was essentially your only option for using TFS with tools such as Xcode.

Visual Studio Tools for Git is a Visual Studio Extension (not a set of command line tools) that provides a set of context menus exposing typical Git operations such as Clone, Push, Pull, and Fetch. If you prefer to work within the Visual Studio IDE (as opposed to the command line) then you definitely want to install this extension.

Cheat Sheet

The graphic below depicts the tools you can use to access TFVC as well as TF-Git repositories from various clients.  There are two items to note with this image:

  1. As announced by Brian Harry, Git will be supported in the on-premises version of TFS 2013 starting with the preview version to be released at this years //Build/ conference.
  2. Although TF-Git repositories are depicted, you can substitute any standard Git repository (e.g. GitHub).

image

Related Posts