In my Visual Studio 2013 post from TechEd a couple of weeks ago, I made a very innocuous comment about including Git support in our TFS 2013 preview that will ship next week (at the Build conference). I wanted to take a few minutes to expand upon it.
We first introduced Git support as a VS 2012 VSIX for Visual Studio and server side support in Team Foundation Service in Feb 2013. Since then, we’ve been updating both regularly – every 3-6 weeks. At the announcement, I also said that Git support would be “included in the next major release”. At the time, I couldn’t say more about what that next major release would be but you now know it is Visual Studio 2013 and Team Foundation Server 2013 – to be released before the end of this year and with a “go-live” preview releasing next week at Build.
That preview will include both integrated Visual Studio tooling that works both against our Git server implementation and others, and a Git server integrated into the on premises version of TFS. The Visual Studio tooling will be an evolution of what you’ve already experienced with the VS 2012 VSIX – with the latest improvements. But I wanted to spend a bit of time talking about our Git server support since you really haven’t seen that yet.
When we made the decision to support Git in TFS, it was in the context of wanting to provide the best distributed version control experience for developers along with the best centralized version control experience. In both cases, we aspire to provide the capabilities in a way that fits enterprise needs for security, auditing, management, reliability, etc. This is an area where Git has historically had some weaknesses and a poor reputation. So, as we set out to add Git support to TFS we set out to do it as an “enterprise grade distributed version control system”. At the same time, it was important to us to “stay true to Git” by ensuring that our implementation is 100% Git compatible – supporting the full set of Git features and compatible with any Git client.
We have tried to do this by providing a set of additional capabilities and control on the service while allowing the distributed clients to have “full freedom” to do with GIt as they choose. This gives administrators the ability to provide some control over the central server while not imposing constraints on what developers can do with their local repos.
As with Git, in general, we are on a journey and not everything I’m going to talk about here is 100% done but much of it will be in TFS 2013 and the rest should appear in Updates to TFS 2013. So let’s get concrete about it:
Ease of installation – We’ve now made installing Git a seamless part of installing TFS. There’s nothing to go and track down and download. Nothing to install and configure separately. You just install TFS 2013 and automatically get Git support.
Support and servicing – Because we are shipping it, we support it. This means if you have any problem, you can contact our support and get help. You will receive security updates, hot fixes, regular Updates and more all the same way you are used to getting them. We’ll work hard to make sure your TFS Server is healthy and up to date regardless of which features you are using.
High availability – Since early on, we’ve worked to make TFS support high availability. Our Git support is no exception – we support all the same things you are used to with TFS – load balancing and clustering to ensure that your server will continue to run in spite of hardware and software failures, Geo-replication if you need to be certain that you maintain business continuity even in the face of regional outages, online backup and restore as an integrated part of TFS so that your existing enterprise grade backup and restore policies (full, incremental and transaction log) will continue to work (giving you good RTO and RPO).
Scale – Like with TFS, you can scale your TFS installation seamlessly as your needs grow. This includes scaling out both the application tier and the storage tier as you need to add additional capacity.
Ease of management – Our Git implementation is fully integrated in to TFS so that all of your management policies can continue unchanged – service account management, hardware migration, software patching, backup & restore, monitoring, permission management and more.
Integrated Authentication – Our GIt support fully integrates Windows Active Directory authentication so that all of your access control, auditing, etc can be done against a consistent and manageable infrastructure. As part of this, all changes are audited against an authorized identity assuring you know who made each change.
Enhanced permissions – We’ve built (and are building) a bunch of additional repository and permission management capabilities that allow administrators to “control the chaos”. The first set include the ability to manage repositories (create, delete, rename, etc) and repository level permissions that control Read, Write and Administer permissions. We also include a 4th permission that addresses a key issue many customers have had with Git – “Force push”, which effectively enables users to “alter history”. While we enable this ability, we also enable administrators to disable it with a permission. We are also working on additional permissions now – like branch level permissions that will enable administrators to control who can create, delete and use individual branches. In this way, developers can use branching any way they choose locally but, when they are going to push back to the master repo, they are constrained by policies the administrator configures.
ALM integration – And, of course, we are fully integrating Git into the TFS ALM workflows – work item tracking, build automation, reporting, code review, and more. Not all of that integration is complete yet but we’ll be fleshing it out through the 2013 Updates and, when we are done, we should have full parity on ALM integration capabilities between Team Foundation Version Control and Git Version Control.
Localization – Like the rest of our product, our Git capabilities will be localized into the same languages as the rest of VS making it more approachable by parts of the non-English speaking world.
All in all, we believe that when you combine this “enterprise capability” on the server side along with the ease of use that comes with VS integration on the client side, you get the first distributed version control system really ready for broader adoption in the enterprise. And, I must stress for all those that will be worried that we’ll somehow contort Git, it is and will be a 100% compatible Git implementation with all the capabilities and speed you’ve come to know and love about Git. I encourage you to download the preview next week and try it out.
Thanks,
Brian

Great stuff!
Sounds awesome. We converted to a one team project model last year…and I'm wondering if we'll be able to have both TFS centralized version control and GIT DVCS version control in different folders under the same team project? I've been playing with the service and it feels like it's not possible to mix and match within the same team project…or have I just missed how to configure the right settings?
Brian, you said "You just install TFS 2013 and automatically get Git support." TFS comes with command line tool support (tf.exe, tfpt.exe). Does this mean that TFS will ship a git.exe?
@Immo Currently the (preview) VS plugin provides a link to install the git command line tools (similar, say, to adding TF Power Tools)
That sounds really useful, Brian.
However – for those of us working in mixed environments – can you say whether the annoyance of the Settings -> Version Control selector has been fixed yet? I definitely won't use integrated Git to open projects from Github if it means that I can no longer open Source Control Explorer on my local TFS server.
@Immo, Fair. I was thinking about the server side when I said that. We haven't created our own Git command line – there are enough out there that it just didn't seem like the best use of time. We have made it very easy, through our VS integration, to download and install msysgit. It provides a pretty nice Git command line.
@Kevin, It's not currently possible to mix in a single team project. That's something that I think we'll be watching for feedback on. It's certainly possible to add.
@Kat, You should try it out. I think we've made it much better where it auto-detects what the solution you load uses and switches provider automatically.
Brian
Can't wait but I'm not clear on the workflows you are going to support. Will it be possible to create and manage pull requests in the same simple way as github?
@James, Yes, but we haven't built the pull request workflow yet. That's something we expect to get to comparatively soon.
Brian
+1000 for being able to mix and match GIT and standard TFS Version Control under 1 team project. We want to be able to use GIT where appropriate and still have all the benefits of 1 team project (workitems, builds, global lists, etc). Please make this possible…otherwise we won't be able to use any of the cool GIT features you're talking about.
Re: GIT+TFS in single team project
I'll be curious to watch this, as there is obvious community interest. The biggest challenge that I'll be interested in watching is the implementation of workspaces as they cross between VCS and DVCS implementations… I know that I've always liked the ability to check out (download) very small sections of the source control at a time, whereas DVCS (git/hg/etc) require that the entire repo be downloaded at once… I am very interested to know how you will address this, and how your implementation will be combined with the TFS workspaces (will TFS and git mappings be shared? isolated? etc)
Keep up the good work 🙂
PS: My company is loving TFService
Will we be able to "convert" an existing project that uses TFS VC to Git or will it only work with a new project? Can you convert back to TFS VC after setting up a project using Git?
Congratulations for this great work! I just Love The git support in visualstudio.com
Best regards!
@Scott, I've been thinking about this a bit lately. I don't think we've adequately thought this scenario through. I've sent mail to the team to see what the thinking is and prompt them to think about this scenario.
Brian
We too want to mix and match in one team project
…please make it so.
@Scott – as you point out, with a DVCS you have to download the entire repo to the client to access any of the files. This was one of the factors that caused us to increase the investments in the Web experience for version control – so that you can view files from the server and even download portions of the repo (Git or TFVC) as a zip file.
@Martin – Please don't make me leave VS and go to the web (bluurghh) to have to convert a repo to GIT via a zip. Does the entire repo zip somehow include history revisions? Can I generate the entro repo zip from within VS?
Will the Git client support still be in Visual Studio 2013 even if I don't use any part of TFS, like it was a standalone source control provider?
@Jesper, Yes.
Brian
I would love to see simultaneous TFS VC and Git support. I believe that another SCM company supports Git and Mercurial at the same time. The server provides uses metadata to perform translation between the two. Basically, give my users the option to use either without intruding on the other.
@Brian, thought as much, looked like it, nice to get confirmation.
Will downstream clients like VS 2010, VS 2012 be able to work with GIT based repo in TFS 2013?
@Josh – VS 2012 & VS 2013 and beyond will support Git integration. If you are using a prior version of VS, you will need to use some other client – command line, shell, or VS 2012 or 2013 side by side.
Brian
@BrowniePoints Supporting TFVC and Git simultaneously is significantly more difficult than what other providers are doing supporting Hg and Git at the same time. In that case, both systems have very similar data models and branching models which makes a high-fidelity translation possible. We actually considered this approach long ago when we decided to start investing in Git support, but the differences in the data and branching models (TFVC branches in the path space, Git is outside of the path space), along with poorly aligning concepts (think encoding, rollback, undelete) meant that the translation would always be lossy or TFVC would have to limit some of its features. For those reasons, we didn't pursue this approach.
That all sounds great! Can't stand to try it on my own. I quite curious also whether the automated/custom deploy features are going to be part of this version. There is usually nothing posted about that. But as for me, being enterprise ALM solution means support for fully automated build/test/deploy pipeline.
@Josef, we will have some coming as part of our InRelease acquisition.
Brian
So now Microsoft is actually helping spread Git 🙂
P.S. for those interested in mixing TFS and Git repositories, this might or might not be of some relevance to you: http://www.jillesvangurp.com/…/git-svn-flow
I'm playing around with Git functionality in TFS & VS 2013 preview and it is VERY impressive. Are there plans for TFS to give access to repository hooks? As a CM Admin, there are some things I would like to do on the server side prior to accepting a push (validate branch/merge policies, enforce coding standard, etc) and after the push is accepted, there are useful things that can be done (like trigger a jenkins build or notify other web services). With other git servers, I have access to the .githooks directories. I do not see them on my TFS machine, however.
Thanks!
@Thurston, For the on prem server, we actually do support a DLL interface that has a similar function. In fact, I've suggested that if the community doesn't build an adapter to plugin into our DLL interface and run git hook scripts, we should. So, in short, I'm confident such a thing will exist and you could do it yourself if you like. For the hosted service, no, we don't support anyone running code on our service. Yes, we will support web hook kinds of call outs but I think they will be notifications only.
Certainly interested in feedback,
Brian
+1 for Pull Requests – it's a must
Will TFS Web Access support browsing git repos?
@Shrike, it already does support browsing Git repos.
Brian
Could you say, is it availible to use another existing git server instance (not tfs) for new team project (as source control) or can it syncronize my team project sc with existing git server instance (not tfs)?
@abolshakov, I suppose it depends a little on exactly what you mean. VS can connect and use natively any Git server. TFS is also now a Git server. You can push from any other Git server to TFS and vice versa.
Brian
Brian, thanks. I mean: we already use git server (with XCode and Eclipse IDEs) and we want to introduce TFS2013 (to use item tracking, planning, reporting, analytic and other great TFS features), as I've understood,for doing this, we should in TFS server create new team project with git source control and move our code from our git server to this new tfs git server, question actually was about: if we want continue use existing git server and link commits with work items in our team project (in TFS), is it availible? to bind existing git server instance with team project or something like automated code migration, probably something like Team Foundation Server Integration Tools that was in 2012 release, but with git support. Thanks.
Any support for VSS database conversion to VS.Net integrated GIT.
I've been using git + tfs for a team and enjoying it. Hoping to roll it out to a bunch more projects soon, and hence use the power tool (TPT.exe) to create projects with Git. Doesn't look like the powertool supports this yet though… are there plans to make this work?
sorry should say TFPT.exe
@Andrew, Hmm, good point. I hadn't really thought about it, though I suspect someone on my team did. I'll ask.
Brian
@Subba, No, that's really not something we have considered. You might want to create a UserVoice suggestion for it and see how popular it is.
Brian
@ Andrew D – We're looking into what it would take to support Git in the createteamproject power tool. I'll reply back here once we have a plan. Thanks!
Regarding your reply to server hooks " For the on prem server, we actually do support a DLL interface that has a similar function.". I was unable to get any details on the dll interface. I have a similar requirement to track every code update with a issue number. I do not want to do that on the client side for a few reasons
1. It can be overridden
2. Integrated VS tool does not support it yet.
3. It is still dependent on the user.
Is there a way to create custom server rule before accepting a push?
I would like to split our codebase into multiple git repositories. It is now possible to have multiple git repositories in one TFS project. But it is not possible to have a single solution that contains projects from various git repositories.
Could you consider adding support for this?
@Anand – We haven't yet published any of the details for how to write a plug in that receives the server side events, but I'm working on putting an example together. I'll post back here when I have something to share.
@Petr – We don't have any plans in the short term to support solution that span multiple repositories. Something that we do have on our backlog is to improve our client support for submodules. If you could add one of the repos as a submodule of the other, would that meet your needs?
@Matthew: Submodules could solve our issue. But I would like that submodules will be as transparent for users as possible. Because in our case users will offten modify files in submodules – so we need an easy way to push changes to all submodules and pull from all.
@Matthew – Is there any place we can track the status of git sub module client support? It's killing our ability to use automated builds as they aren't cloned by the TFS build agent correctly. Thanks
@James – The best place to track progress is the Visual Studio UserVoice site. visualstudio.uservoice.com/…/3606383-add-submodule-support-in-visual-studio-git-extensi
Adding submodule support to the client (which includes the build agents) is one of the top asks from the community and we're already working to add the support. FWIW, there is still work needed in the libgit2 library to enable submodules to work correctly, and if you're interested in contributing I'm sure the community would welcome the support 🙂
@Matthew, regarding your reply "We haven't yet published any of the details for how to write a plug in that receives the server side events, but I'm working on putting an example together. I'll post back here when I have something to share."
Can you tell me what the current status of this issue? Are there any news?
@Karsten – No, we haven't had a chance to publish an article yet. If you email me (mmitrik at Microsoft) I can send you a rough example.
I want to know, how to only remove the codes (part) under tfs2013 git resps.
have any ideas? thanks
@javaning – Can you give any more detail about what it is you're trying to do with Git in TFS? I'm not sure what you mean by "remove the codes".