109

There are tons of questions and answers about Git versus TFVC Source Control, but no current answers cover the integration of Git into Team Foundation Server/Service that I can find.

I'm starting green pasture development using a wide variety of languages (C#, C++, PHP, Javascript, MySSQL) using Visual Studio 2013. In the future, there will be some iOS development. I'm very familiar with SVN, VSS and TFVC for source control. However, I have never used Git. I prefer TFS for process management/agile development... It's not perfect, but it integrates well into Visual Studio.

So, to help me decide between these two systems...

What are the big differences between TFVC and Git for source control when using Visual Studio 2013?

  • Is the only benefit in my case a local repository (not saying that it's insignificant) and iOS development support?
  • Is the only drawback to Git the command line interface (some would argue that's not a drawback ;-P).
  • Have you experienced in the Visual Studio 2013 GUI for Git? Is that enough to support basic branching/merging without the command line interface?
  • Is there a detailed start-up guide for Git that shows Git being used with Visual Studio 2013? Microsoft has a video for integrating an existing Git repository into Visual Studio 2013, but I'm looking for a start from scratch with Git and VS 2013.

I am not looking for a book here, but just a few bullet points and maybe some relevant links from folks that have used both TFVC and Git.

Community
  • 1
  • 1
Greg Grater
  • 2,001
  • 5
  • 18
  • 24

3 Answers3

125

Update

Since 2013 a lot has happened:

  • Microsoft has added ssh support to Team Foundation Server, Azure DevOps Server and Azure DevOps.
  • Visual studio 2019 16.8+ ships with a completely revamped git client.
  • Microsoft has moved its own internal products off of TFVC. Windows and Office sources now live in Git in Azure DevOps.
  • Microsoft has bought GitHub which is now the main focus for DevOps related offerings, many people who contributed to Azure DevOps have moved to GitHub as a consequence.
  • Virtual File System for Git & Git Large File System have resolved many of the reasons why people stayed on TFVC.
  • Azure DevOps has a built-in migration tool which can convert (part of) your TFVC history into a git repo.

In all this time very little happened for TFVC:

  • YAML pipelines have yet to receive TFVC support 2 years after their introduction (I'm not expecting these at all).
  • Team Explorer is now called "Legacy" in Visual Studio
  • TFVC has been declared feature complete
  • TFVC support for Eclipse and Visual Studio Code and Linux/Mac are officially deprecated/end-of-life.

It's pretty clear who has won: Git.


What are the big differences between TFS and Git for source control when using VS 2013?

MSDN has a very extensive page on all the features and differences between Team Foundation Version Control and Git.

Is the only benefit in my case a local repository (not saying that's insignificant) and IoS development support?

No, there's lot more, but they're often advanced scenario's of Git. Local Repo, offline support and full local fidelity on history is incredibly powerful, you get that out of the box with Visual Studio. There's a few other features that are great too! The ability to branch and merge from one repository to another is very powerful. I recommend you look up the Pro Git book for those. Git in TFS is just another git server, it has pretty much all features that the standard Git has.

The ability to rewrite history before merging allows you to remove or combine a number of smaller change sets, so that the history is cleaner and easier to read as a human.

Is the only drawback to Git the command line interface (some would argue that's not a drawback ;-P).

TFVC has a command line too, people just don't use it. For people that want to use Git and never do much more than TFVC does, they probably won't really need to leave the UI, they won't get a lot of the cool features though...

There might be a few other drawbacks, mostly due to the fact that it's different than what people are used to. It's not too hard to shoot yourself in the foot if you don't take the time to learn what git does when you do things. Things like Rebase and Squash are really powerful and create a very clean history, but it can leave people with the problem that they can't merge anymore if used incorrectly. TFS has the ability to put some security settings to take away the rights to make very stupid decisions on a git repository.

A very cool add-on for Git users on Windows is PoSHGit. it provides command autocompletion on the Powershell commandline.

Have you experienced in the VS 2013 GUI for Git? Is that enough to support basic branching/merging without the command line interface?

It has all you need for basic operations. But you do need to be able to visualize the different branches to know what's going on. Since the Git server and local repo are just Git, any git client can help you out here. SourceTree is an option here. The Git for Windows client is another.

For standard operations, check-in, check-out, merge, branch (or push, pull, fetch, commit, merge) the UI works just fine.

Is there a detailed start-up guide for Git that shows Git being used with VS 2013? MS has a video for integrating an existing Git repo into VS 2013, but I'm looking for a start from scratch with Git and VS 2013?

Starting with Git is available in a number of places... These are a few options:

Other good reads:

And a few tools worth installing:

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • 3
    The ALM Rangers will soon release their Git for TFVC users guidance here: http://vsarbranchingguide.codeplex.com/releases. The current Beta release doesn't have it yet, I expect it will drop with the next batch :). – jessehouwing May 06 '14 at 21:27
  • 8
    After almost a year since my original post, I thought I'd let you all know that we have been using VS2013 with Git successfully. Love the ability to create multiple repositories under a single Team Project. We've had a few problems merging. In several instances the auto-merge chooses incorrectly. So what looks like a successful merge really isn't. We now double check all merged files. Also, there are certain instances where the merge chokes and throws an error in the VS UI (libgit2 merge conflict). To fix, we have to drop to the cmd prompt and issue a git pull (not fun). – Greg Grater Nov 05 '14 at 22:51
  • 1
    I know there is a fix coming for that last error as part of Update 4. And that there were cases where the end-line settings differed between developers that can cause these issues to occur. – jessehouwing Nov 06 '14 at 07:57
  • 5
    We have been using VS 2013 w/Update 4 since it dropped months ago and it seems to have fixed all of our Git issues from the GUI. We are in the habit of pulling regularly from the remote server which helps keep our local repositories up-to-date. Also, MS has been going through several positive updates to the Product Backlog / Task boards of late. Directly from the board, you can now edit the description, assign, set the status and adjust the priority/order of the item. – Greg Grater Mar 19 '15 at 11:20
  • 1
    The "Git vs TFVC" links are linking to "Get started using Git". Does it mean now that we better should use Git over TFVC? ;D found a new link: https://www.visualstudio.com/en-us/docs/tfvc/comparison-git-tfvc – Martin Schneider Jul 05 '16 at 16:52
  • 4 years later and I still get action on this post. Have been using VS 2015 with VSTS and Git source control for a while now. Most common actions are supported directly through the VS 2015 IDE with little need for external tools or command line support. What little command line support that is required is well documented by the community and easily googled. VSTS Agile/Scrum interface is excellent for tracking work and seamlessly integrating with VS 2015, Git source control and Release Management. Lots of great online training on this subject on PluralSight. – Greg Grater Feb 02 '17 at 16:20
  • what version of git server is used by TFS server @jessehouwing – Ram Mar 16 '17 at 22:24
  • @ram, it uses its own implementation of the protocol based on libgit2 with storage in SQL server. – jessehouwing Mar 17 '17 at 08:15
  • Tried Git but I didn't like the way it branches. Sticking with TFVC as it is superior than Git. – Silent Fart Oct 04 '21 at 10:09
  • @SilentFart You're threading into deprecated territory here. YOu may not like the long-term consequences. I'd love to explore what you didn't like... – jessehouwing Oct 04 '21 at 12:26
17

To clear up some confusing mixed terminology that is used a lot with TFS

Team Foundation Server (TFS) is an application life cycle management tool, which includes a source version control system (VCS) component.

The VCS component that TFS uses is primarily Team Foundation Version Control (TFVC)

So, the question would be TFVC vs Git

(In fact, TFS supports Git as a VCS option.)

So, the question is: TFVC vs Git

jessehouwing has a great answer that covers this in good detail, so please reference that

As far as choosing which to use, in my opinion Git wins

  1. It is lightweight: Simple to setup and start using.
  2. It's distributed nature means it is very resilient to disasters, someone will always have a copy of the repo.
  3. Offline work is simple, you are working with your own full repository. You can commit changes, revert, browse history, etc. You only need to be online when you wish to sync with a remote repository.
  4. In TFS there is no simple way to save the state of your changes (file additions, modifications, file deletions), and switch to another state of code. (For example, to work on two features and switch back and forth). In git, you simply checkout a different branch.
James Wierzba
  • 16,176
  • 14
  • 79
  • 120
  • 2
    TFS has branches and shelf sets (which allows for #5) and you can even configure your projects to use git if you really want. TFS VCS also has a command line for #. It's not lightweight but it does a hell of a lot more out of the box than git as it has a full project management/bug tracking/work tracking/release management/build management/check-in policy/testing built in. – Matthew Whited Jul 23 '18 at 17:39
  • @MatthewWhited Sure it is possible, but it is extremely cumbersome compared to git, due to it's directory based implementation versus git's graph-based implementation. Note that I stated that there is no `simple` way to do it. – James Wierzba Jul 23 '18 at 18:16
  • @MatthewWhited Also, I agree on the extra application lifecycle tooling, but I'm scoping my answer to only source code version controlling solutions. – James Wierzba Jul 23 '18 at 18:18
  • 2
    IDK... I've find TFS pretty simple to use. Though I also dislike all of the branches created by GIT as it makes it more complex to ensure everyone is one the same code with fast churn for some while slow for others. – Matthew Whited Jul 23 '18 at 19:04
  • 1
    Don't know. GIT is simply too complicated for the task it aims to accomplish and very non intuitive (why is it a pull request and not push request ?!). TF source control is very simple and can be explained to any new developer in my team in minutes. I also see encouraging working locally as a big disadvantage inside a team and even individually. How do you prevent losing your work in Git without littering the project with branches ? (For this there are shelvesets in TFS - ON THE SERVER) – Cesar Jul 16 '20 at 23:03
  • the developer is requesting that their changes be "pulled" into the master branch. but you can just as easily think about it in terms of the developer is requesting to "push" their changes into the master branch – James Wierzba Jul 17 '20 at 21:46
4

Is the only drawback to Git the command line interface (some would argue that's not a drawback ;-P).

If you're uncomfortable with the command line interface, there are multiple GUI frontends available for Git. Git itself actually contains repository browser GUI tool called gitk and git-gui - a GUI for git. Then there are third-party apps such as git-cola, TortoiseGit and others.

w5m
  • 2,286
  • 3
  • 34
  • 46
kralyk
  • 4,249
  • 1
  • 32
  • 34
  • 2
    Of course Visual Studio itself provides a GUI for Git. But there are always times you might want to dive into the commandline to do things that are otherwise impossible. A GUI that exposes all Git commands is just as difficult as the commandline. – jessehouwing May 21 '14 at 07:34
  • There are command line power tools. For instance to completely eliminate a branch from existence. – Engineer Apr 08 '19 at 21:05