57

Update: I don't use TFS anymore. But from the comments I can see that git-tfs is obviously the way to go nowadays.

Has anybody experience using Git as an offline solution for Team Foundation Server?

For Subversion you could use git-svn to keep a private repository with a svn backend.

I tried to use SvnBridge and git-svn to work with TFS. At first it looked promising but Visual Studio recognizes the solution as being under TFS version control and interferes during commit.

Are there other ways to combine those two?

Christian Deger
  • 793
  • 1
  • 5
  • 8

9 Answers9

84

I've started working on a tool called git-tfs, similar in some ways to git-svn.

https://github.com/git-tfs/git-tfs

vossad01
  • 11,552
  • 8
  • 56
  • 109
Matt Burke
  • 3,306
  • 1
  • 22
  • 16
14

A new offering from Microsoft: Git-tf

Announcement: Announcing Git Integration with TFS

Download: here

Source (CodePlex): here

vossad01
  • 11,552
  • 8
  • 56
  • 109
  • Git tf supports tfs 2008, 2010 and 2012 according to this article http://visualstudiomagazine.com/articles/2012/08/13/tfs-now-integrated-with-git.aspx – Konstantin Oct 25 '12 at 09:00
  • @Konstantin Thanks, edited answer. I wonder if that is new or if I just completely miss read something. Either way, time for me to switch now :) – vossad01 Oct 25 '12 at 13:14
  • 3
    For anyone who is confused, git tf is different to git tfs, and the reason is: "One of our big requirements was to create a cross platform solution that works just as well on Windows, Linux or MacOS. That really wasn’t in the sights for the existing Git-tfs project and, together, we agreed that separate, cross platform solution made sense. Hence Git-tf was born." The original announcement can be found here: http://blogs.msdn.com/b/bharry/archive/2012/08/13/announcing-git-integration-with-tfs.aspx – Tim Abell Jan 09 '13 at 00:21
  • Does anybody has alternative to use git-tf for TFS 2008? The above link helps in doing only for TFS 2010 or later – phoenix Aug 13 '14 at 18:38
8

I'm sure it's possible, but it's going to be very rube goldberg-ian in its construction and will most likely lead to more pain than pleasure. I suggest picking a source control system and going with it.

If you need real offline support then git is awesome, but windows support is still a bit flakey.

jonnii
  • 28,019
  • 8
  • 80
  • 108
  • If you use Git from a command line on Windows, it's mature enough. UI apps for Git (Git Extensions, Tortoise Git..) might be better, but they are OK still. – Konstantin Tarkus Jun 08 '11 at 11:26
  • Now that's it's 2011 the support is a lot better. Thankfully! – jonnii Jun 08 '11 at 17:09
  • "I suggest picking a source control system and going with it." That's not helpful to people who aren't empowered to make the decision. – skiphoppy Oct 26 '12 at 15:50
  • What I meant was, once a source control system has been decided on use that, don't try to use something else and integrate with it. Git-Tfs exists now, so that's a real solution to this problem... – jonnii Oct 26 '12 at 15:55
5

We just decided to do this at work. Here is a blog post about how we did it.

http://blog.lozanotek.com/archive/2009/10/20/git-svn_SvnBridge_and_TFS_Source_Control.aspx

Just found this project on Github too.. this might work but I have not tried it yet.

http://github.com/spraints/git-tfs

Rob
  • 1,163
  • 2
  • 18
  • 28
3

I can tell you it is possible...

Also here you can find some minor details about someone with the same experience: http://blog.zobie.com/2009/04/using-git-to-avoid-problems-with-tfs/

2

TFS supports git now: tfs news git support

Anders R. Bystrup
  • 15,729
  • 10
  • 59
  • 55
  • 1
    Only the hosted TFS from tfs.microsoft.com but probably the next major release of TFS for on-premise installation. – riezebosch Apr 25 '13 at 08:46
2

Brian Harry goes through some great detail about the new integration of Git repositories into the Team Foundation Service as well as Team Foundation Server 2013. There are quite a few interesting points he makes that are particularly important to enterprise and generally for teams who care about having a solid hosting of their Git repos:

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.

Source: Enterprise Grade Git Repos

Community
  • 1
  • 1
Ed Blankenship
  • 5,235
  • 1
  • 31
  • 31
2

Slightly off-topic to your question, but I have written a Powershell script that converts a TFS repository to a Git one. Might also be useful.

See my Github repo for the script

Sardaukar
  • 29,034
  • 5
  • 26
  • 32
0

I agree with Matt Burke said, I think http://git-tfs.com is your choice. But there some drawback:

  • you have to commit 2 times, once in VS and once in Git console

  • if you want to link a changeset to some item, you have to do learn more about git-tfs statement (rcheckin,...)

Tan Le
  • 57
  • 1
  • 8