Version control is probably the single most important piece of the development environment after the IDE itself, essential for teams and I’d argue extremely valuable even for a solo developer. So, if you’re about to start a new project it’s a good time to consider what version control solution you’re going to use.
Before we go into our friendly debate, let us think a list of items that is important to the Business.
What Business needs?
|Source Code repository is backed up with minimal efforts
|Source Code repository is available inhouse
|Only authorised person can view and access Source Control
|Easy to recover code at any point in time.
|If one person is not available then it should not make an impact to others’ productivity
|Branching and Merging is allowed.
|(Probably most important) What developers wants….
What Developer needs?
|Branching and merging should be as easy it can
|Integration with my other developer tools such as Visual Studio, Eclipse etc…
|A way to shelve (TAG) the code into the repository for backup or sharing a code purpose
|Muliple users can work on same file
|Easy to manage any conflicts or even rollback.
|Compare any changes and recover code anytime.
Knowing TFS and Gits.
Well, I like Team Foundation Server and I like Git, but which is better?
Team Foundation Version Control (TFVC) uses a single, centralized server repository to track and version files. Local changes are always checked in to the central server where other developers can get the latest changes.
Git is a Distributed Version Control System (DVCS) that uses a local repository to track and version files. Changes are shared with other developers by pushing and pulling changes through aremote, shared repository.
NOTE: With the help of TFS 2012 or above we can support local as well as centralized model.
It is quite clear that you can go both ways and Gits has no reason to win over TFS except that it supports Open source community.
You can get Visual Studio Online free of cost for 5 developers:
Even though Microsoft TFS has started supported DVCS model, the support is very limited. You can only use it for some purposes such as modifying file offline.
TFS with TFVC, with either model (Edit Commit with local workspaces, Check-in Check-out with server workspaces), is still centralised, so a developer working locally without a connection to the server has some limitations such as not being able to create branches, merge changes, view history or perform compares without the server connection. In other words, TFVC is not a DVCS, and if that’s what you need then you’ll probably be looking at the most popular DVCS tool, Git.
Git arose from the Linux kernel development community (including and in particular Linus Torvalds) in 2005 and has become the leading DVCS tool. It has a totally different model to centralised version control systems like TFVC by keeping a full repository locally on the developer’s machine. The repository is essentially a file based system with metadata in hidden files. The developer can then perform any task offline, including checking out, editing, committing, viewing and diffing on the full history, creating and destroying branches, merging and more.
At appropriate points the developer’s local repository can be synchronised with a remote repository either by fetching, pulling or pushing changes. This, of course, does require a connection to the remote repository.
Git is popular with Open Source teams, who are typically highly distributed, and suits modular codebases where individuals can work entirely locally for extended periods.
Most of the Windows Git tools are command line based, but Visual Studio also has Git integration, either via the Visual Studio Gallery or in 2013 it’s out of the box.
Having added this solution to a Git repository there are commands available within Visual Studio to work with Git, in this case right-clicking on the solution to commit changes locally to the Git repository.
TFS with Gits.
TFS 2013 now includes Git repository support out of the box. When you create a new Team Project there is a new page in the wizard asking you to specify whether you want TFVC or Git for the version control aspect of the Team Project.
I won’t go into the step-by-step how to for using Git in TFS, as this is covered very well elsewhere, amongst others, but the Git features and the TFS features are now integrated. For example, when I commit local changes to Git in TFS, I can also associate work items (such as a user story or task)
This means that I can continue to use the capabilities of TFS (Agile tools, work items, build and so on), whilst selecting Git as the version control solution within TFS, and having the two areas integrated.
Is this a special “Microsoft” version of Git? No, it’s absolutely standard, meaning that you can use the tools with Visual Studio and/or your own preferred command line or other Git tools, as you wish.
I hope that this clarifies the new options around version control within TFS, and that where you might have been having a discussion about DVCS vs Centralised, or Git vs TFS, that new possibilities have been opened up.
If team decided to go for Gits then probably it is good to go with TFS and Gits combination. Then we probably don’t need to go for any other agile modeling tools.
Infect, we can probably use Team rooms feature of Visual Studio 2013.