Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between git-tf and git-tfs?

I've recently been getting really fed up with TFS. I've heard that there is a light at the end of the tunnel though. Apparently I can use either git-tf or git-tfs and treat my code as if it was managed by git, but be able to push/pull to/from a central TFS server.

My main question is I'm not sure which one of these I should use. There is git-tf which is officially supported by Microsoft, and there is git-tfs which has been around a lot longer. What's the differences between these and which should I try out first?

like image 236
Earlz Avatar asked Oct 12 '12 20:10

Earlz


People also ask

Is Git and Git TF same?

Git-TF is a set of cross-platform, command line tools that facilitate sharing of changes between TFS and Git. These tools allow a developer to use a local Git repository, and configure it to share changes with a TFS server.

Should I use TFS or Git?

You should use Git for version control in your projects unless you have a specific need for centralized version control features in TFVC. In other words, if you have a very specific reason why you need to continue using TFVC, Microsoft would rather you didn't.

What is the advantage of Git over TFS?

It keeps the history clean and avoids all those unreadable merges. Compared to our time with TFS, we have much less merge conflicts now are on Git. The main reason is that Git does a three-way merge because it knows exactly where two branches started to diverge.


1 Answers

Disclaimer: I started the git-tf project and although the project is now in very capable hands without me as a frequent contributor, you should absolutely consider my opinions on this to be strongly biased. (And, assuming you're on Windows, perhaps unexpected.)

There are two fundamental differences between the two tools:

  • git-tfs was built for Windows users and written on top of the .NET TFS SDK. The TFS SDK will not run under Mono, so this makes git-tfs unsuitable for cross-platform use.

  • git-tf was built for cross-platform users and written on top of the Java TFS SDK. Thus, it will run anywhere that's supported by the Java TFS SDK (Windows, Mac, Linux, AIX, HP-UX, Solaris, etc...) git-tf was explicitly created to allow Xcode users to access TFS.

On Windows, of course, you can use either. I'm not going to necessarily say one is better than the other. But I will say:

  1. My biggest complaint about git-tfs is that it won't work on Mac OS. If there was a way to make git-tfs cross-platform, then git-tf almost certainly wouldn't exist.

  2. git-tfs is faster in some cases than git-tf. Performance was not our priority in the first few revisions, correctness was.

  3. Because git-tf has a wide platform support matrix, this means that its functionality is necessarily constrained. For example, there is no UI. git-tfs, on the other hand, has a checkintool command that will open the normal TFS Checkin dialog. This can be exceptionally helpful in visualizing your changes. (If I recall, you can open up a proper visual diff from there, etc.)

  4. git-tf works by populating the git repository directly, downloading TFS objects directly into the git object database. git-tfs works by creating a TFS working folder mapping in a hidden folder, then populating the git repository from that. There's a disk penalty here, so if you have superginormous repositories, you might feel this.

  5. git-tfs can try to map your TFS branches to your git branches. A lot of people will see this as a positive for git-tfs, though I don't: git's branching model (at the repository level) and TFS's branching model (represented as folders in the repository) are so radically different as to cause problems in anything but the most simplistic workflows. But your mileage may vary.

  6. git-tfs is actively developed by a community. git-tf has not had the community adoption.

I don't want to make it sound like I'm saying git-tf is bad. It's not. I think it's actually pretty good. But it may not be your best choice.


Update: git-tf has reached end-of-life. It is no longer maintained or supported by Microsoft. We recommend git-tfs if you want a bidirectional TFS <-> git solution.

like image 170
Edward Thomson Avatar answered Sep 21 '22 10:09

Edward Thomson