Git in Visual Studio ALM world

Posted by Sahas Subramanian - August 02, 2013

header-picture

With increasing popularity of Distributed Version Control System (DVCS), Git – one of the widely used DVCS got added into Visual Studio ALM family. This happened earlier this year on ALM summit 2013, Microsoft announced that Git will be embraced in TFSservice first. This announcement certainly caught surprises and applauds. So, what is DVCS, why should Microsoft add it into the VS ALM platform when TFS has an existing version control system..

Existing version control system – Team Foundation Version Control system is basically a centralized version control system, significantly invested and one of the very good systems out there.

DVCS – Git – is another type of version control system that is principally different than the centralized version control.

Below are some of the significant value adds that Git could bring into the table are

Work Offline

Git allows users to perform majority of the version control operations from local system and hence they need not be connected to the server always. Users can fetch a specific version of the code base, stay offline and work. This sounds ordinary but the differentiator here is the Git enables the users to enjoy all the benefits of a version controlled system while they are not connected. Meaning, even if I'm offline, I can check out a specific version, make changes. If I made incorrect change, I can compare against the previous version and undo my change. I can create private branch and work in isolation. I can merge my changes from PoC branch to Dev branch in local. Finally, when I'm ready to publish my changes, I can see the entire history of my local changes which are marked ready for publishing, cherry pick them and publish. Publish will submit my local changes to remote repository for team collaboration

Collaborate offline too

While working offline, I can still collaborate by reading my colleagues repository

Though it's local, never lose anything

Every change in Git in unique and immutable

Stage your changes before publish

Git has an intermediate location where changes can be "committed" and staged for publishing. This is very useful.. start working, finish, stage stuff and pickup the same file again, work on another feature without affecting each other.

Branching/Merging/Isolated development

Branching is extremely light weight in Git. While creating a branch Git doesn't copy files, instead, Branch is a reference to a commit and history is extracted using commit relationships. Merge is never single click in any tool, but, Git makes it much easier experience.

And many more..

So, when a powerful DVCS such as Git joins the party, it a great value add for end users from version control perspective.

Now, icing on the cake is the ALM integration. Same as TFVC, Git check-ins can be associated with a Work item, integrations with Team Foundation Build, My Work, Code reviews …

So, what is required to start using this?

If you are in VS 2012 – download Git tools here.

If you are in VS 2013 – Its inbuilt within VS 2013. No need for another plug-in, Team Explorer will let you create, manage local and remote Git repositories

Irrespective of the client side, you may use any remote/server side repository. It could be TFSService, TFS 2013, GitHub etc…we'll focus on TFS 2013/VS 2013 Prev.

Work with Tfs Git Version Control Repository

I created a Team Project with Git repository. Connected to that Team Project from Team Explorer.

Once connected, Team Explorer presents you with possible options.

As I mentioned above, Git in VS ALM is something beyond just version control

Version Control capabilities

 

  1. Clone the repository to local disk and start working offline
  2. Track changes and Commit them onto Staging area
  3. Track Committed changes and Push
  4. Create and Manage Branches

ALM collaboration capabilities

  1. Associate TFS work items such as Tasks and Bugs corresponding your code change and Review reports generated by TFS
  2. Define builds using Team Foundation Build, enable Continuous Integration builds on Team Build for Git repository Push

Go over here for detailed walk thru of "Version Control with TFS 2013 Git Repository"

Topics: Blog


Recent Posts

InCycle Named Azure Data Explorer (ADX) Partner

read more

OpsHub & InCycle Help Top Medical Device Company Accelerate Innovation

read more

InCycle Continues to Lead, Recognized by Microsoft for Industry Innovation. Earns Impact Award.

read more