The distributed version control system gets native, built-in support.

Microsoft announced Wednesday that it is adding git support to TFS and Visual Studio, putting the distributed version control system on an equal footing with its current centralized system. In so doing it makes Visual Studio and TFS much better choices for distributed development teams and open source developers. Many of them were put off from even looking at TFS for one reason in particular: centralized version control. With git support, that could start to change.

Microsoft TFS is an all-encompassing application lifecycle management platform. Both the on-premises Team Foundation Server and the cloud-hosted Team Foundation Service provide version control, bug tracking, software building, testing, and more, all in one integrated platform. But a lot of people aren't interested in TFS at all, because of that version control component. It's a centralized version control system, so there's a single source code repository that every developer uses, and that repository tracks all the branches and modifications that everyone uses.

That model still has its adherents, and especially for corporate users, it works well. But there's competition from distributed version control systems (DVCS), which have become extremely popular. In these systems, developers have their own repositories with their own branches and modifications. These repositories are published, and patches can be moved between repositories. In particular, this model has thrived in open source projects and in any situation where developers or developer teams work in multiple locations.

The lack of DVCS support in TFS is a major stumbling block for these developers. Version control isn't the only thing that TFS does, but it's fundamental to the product and how it's used, and since it hasn't supported DVCS, the other features it does offer are largely irrelevant to any potential users.

With today's announcement, that all changes. Microsoft is developing DVCS support for TFS and Visual Studio, with the first preview version of that support available today.

git a load of this

And not just any DVCS. Microsoft is supporting git, the DVCS system initially developed by Linus Torvalds so that he could better manage development of the Linux kernel. git is arguably the most popular, most widely used of all the DVCS systems. It has found particular prominence with the success of GitHub, a project hosting service that's a kind of modern-day SourceForge without the same stench of decay.

Both Server and Service will host git repositories, and a plugin for Visual Studio will provide full support for source control operations such as merging changes between branches. Though designed "together," the Visual Studio's git support is just plain old git, and as such it will work with GitHub, BitBucket, or any other git repository.

Underpinning Microsoft's git support is a project called libgit2. This is GitHub's own git implementation. It's licensed under the GPL, albeit with an exception to allow unmodified versions to be used by closed source software. Since September last year, Microsoft has made a number of contributions to libgit2 in order to improve its functionality and reliability on Windows. Many of these contributions have been integrated into libgit2.

Future versions of Visual Studio will incorporate this git support in-box (not that anyone buys boxed copies these days), likewise TFServer. Today, TFService can host git repositories, and there is a "community preview" of the Visual Studio git support available to download. This preview needs, in turn, a preview of Visual Studio 2012 Update 2.

The DVCS model is very different from the centralized model, and Microsoft is not trying to marry the two together. When using TFS with git, it will use git-style terminology (commit changes to the repository, push changes between repositories, and so on); with its centralized repository, it will continue to use existing TFS terminology (check in changes). Migration from centralized repositories to git is possible with the Git-TF tool Microsoft released last week.

TFS's git support will, however, include the same kind of TFS integration as the centralized repository. As a basic example, commit messages will be able to link directly to their corresponding issues in the issue tracker. In the future, the full range of TFS functionality, such as automated builds, will work with git repositories; presently, only manual builds are supported.

It's still a bit surprising to hear about Microsoft embracing an open source project in this way. While users of competing DVCS platforms such as Mercurial might be a little disappointed, Redmond is delivering what a lot of developers actually want: git support. Microsoft is embracing a market-leading open source project and striving to provide first class support—and providing numerous contributions to the community in the process. This is a pragmatic decision, and as an occasional GitHub user myself, it's an enormously welcome decision.

Fantastic, I was waiting for someone to make a good git plugin for VS. Who knew that MS would be the first! To the Gitmobile!

There's at least 2 plugins for Visual Studio already. Though, I can't speak on the whole 'good' thing as I don't use Visual Studio, I just did a bit of research for people I was working on a project with.

At work we just transitioned over to Git from Subversion as we are using the agile development method. Using VS2012 there just aren't any good plugins yet. It is still easier to use gitbash and just do it in the command line because the plugins are clunky.We need some good windows git clients, hopefully atlassian will make Sourcetree for windows soon as that would be a definite step up and its free.

I recently started looking at Git-TF as a way for me to do various experiments on our source code in a separate (and disconnected) branch without having to keep things checked out from our tightly controlled TFS repos.

This is great news for my job. We started using git for our small team to keep code history in place as we do new development. Up to now, we've used the Git Source Control Provider extension for VS2010, which gets the job done, but has some issues working with things like submodules, so it would be nice to see an integrated solution like this.

At least I thought we did. Turns out my coworker hasn't been using source control. Christ, what an asshole.

For those of you who has already used Git for enterprise development. Can you please suggest what is the Git Server that you are using? Let's assume we want to host our Git server in house. What choice do we have?

For those of you who has already used Git for enterprise development. Can you please suggest what is the Git Server that you are using? Let's assume we want to host our Git server in house. What choice do we have?

At work we just transitioned over to Git from Subversion as we are using the agile development method. Using VS2012 there just aren't any good plugins yet. It is still easier to use gitbash and just do it in the command line because the plugins are clunky.We need some good windows git clients, hopefully atlassian will make Sourcetree for windows soon as that would be a definite step up and its free.

You should take a look at SmartGit. It is not free, but at USD 79 per license it is inexpensive. You can use it with Git, Mercurial or SVN, and it connects to GitHub and other hosting providers, just like SourceTree. I started using it a few days ago at work, and I really like it so far.

I can also confirm that TFS is available via MSDNAA (which gives free access to everything but Office to computer science students). I'm not sure which level of MSDN access this corresponds to, though.

For those of you who has already used Git for enterprise development. Can you please suggest what is the Git Server that you are using? Let's assume we want to host our Git server in house. What choice do we have?

Apparently the update will provide support for VS Express, but the current git plugin they made will not work, because it's a plugin and that's now allowed.

On the 64bit compiler question ... on x86, VS Express 2012 will not install the cl.exe that support compiling x64 on x86, but in all configurations, x64 output is available. Pro and up VS 2012 of course can compile to x64 on x86.

Really what more did you want? And you are a really compiling on x86? Is that a real issue or just a hypothetical.

Huh... that's weird, then. I got my copy of VS2012 through DreamSpark, so maybe that's the difference? The only option was x86, and googling brought up a statement by MS that they wouldn't be releasing an x64 version.

Apparently the update will provide support for VS Express, but the current git plugin they made will not work, because it's a plugin and that's now allowed.

On the 64bit compiler question ... on x86, VS Express 2012 will not install the cl.exe that support compiling x64 on x86, but in all configurations, x64 output is available. Pro and up VS 2012 of course can compile to x64 on x86.

Really what more did you want? And you are a really compiling on x86? Is that a real issue or just a hypothetical.

I may have been just confused, then. I'm kind of new to programming on Windows. So if I set the build target (in the linker options) to x64, then it will run as x64 on x64 machines (which are all of my machines)? Even if I don't have the option to set "Active Solution Platform" to x64? I do have (at least) the Pro version.

So, just to get this straight, I'm compiling on a 64bit machine, and I want the output to be 64bit as well. What do I have to configure in VS2012 Pro to make sure this is happening?

Apparently the update will provide support for VS Express, but the current git plugin they made will not work, because it's a plugin and that's now allowed.

On the 64bit compiler question ... on x86, VS Express 2012 will not install the cl.exe that support compiling x64 on x86, but in all configurations, x64 output is available. Pro and up VS 2012 of course can compile to x64 on x86.

Really what more did you want? And you are a really compiling on x86? Is that a real issue or just a hypothetical.

I may have been just confused, then. I'm kind of new to programming on Windows. So if I set the build target (in the linker options) to x64, then it will run as x64 on x64 machines (which are all of my machines)? Even if I don't have the option to set "Active Solution Platform" to x64? I do have (at least) the Pro version.

Your version will look very slightly different but see along the top where it says Win32 - change that - you might need to "add" a new configuration to support x64, but it's fairly intuitive.

The article you found is probably about why Visual Studio is still a 32bit application ... there are several long articles and basically because the MS devs are lazy. (the ones that actually work on the VS gui itself)

The article you found is probably about why Visual Studio is still a 32bit application ... there are several long articles and basically because the MS devs are lazy. (the ones that actually work on the VS gui itself)

For those of you who has already used Git for enterprise development. Can you please suggest what is the Git Server that you are using? Let's assume we want to host our Git server in house. What choice do we have?

Thanks in advance for any advice.

You should check out GitLab (https://github.com/gitlabhq/gitlabhq). It is an open source clone of GitHub that you can host yourself. Integrates with LDAP so you can use Active Directory users with it. I use it to host almost all of my code.