BT

Introducing Sun Yiyi’s Git Source Control Provider for Visual Studio 2008/2010

by Jonathan Allen on Jun 15, 2010 |

As teams become further and further separated, centralized source control systems like Microsoft’s Visual SourceSafe and Team Foundation Server quickly lose their appeal. In their place many developers have turned to distributed source control systems. The most popular one amongst .NET developers seems to be Git, which was originally created by Linus Torvalds for Linux kernel development.

One problem with Git is that it is predominately command-line based. While .NET developers are quite capable of working with the shell, most get quite annoyed when forced to leave the IDE for routine tasks. This is why Sun Yiyi’s Git Source Control Provider an important part of Git adoption. Sun Yiyi writes,

As a Visual Studio user, I would like to see files status in solution explorer. Otherwise I just don't have the feeling that the files are controlled by any source code management system. We are so used to see this when working with SourceSafe, Team Foundation Server, Subversion or even Mercurial. We want the similar experience with Git. I couldn't anything on the Internet, so I decided to make one myself.

The idea is to display the Git file status and make it as much close experience with VSS and TFS as possible. I kept the blue lock icon for checked in (committed/tracked) files and red check icons for modified files. Two new icons are added, the fellow plus and i icons. They represent new and staged status. They apply only to Git.

Opening Git controlled solutions with this plugin, the files are clearly marked differently as they are new, tracked, modified and staged. The current Git branch name is also display to remind you to work on correct branch. The feeling of source control is back.

There are two source control related functions that are handy for Visual Studio users I decided to implement as well. They are “compare file with last commit” and “undo file changes (restore file from last commit)”.

It is a encouraging starting point. I have got an eye candy. Now I started to think why should I right click to launch Git bash and type git init to create a new local repository? Can't I just right click and select initialize new repository?

At least for now, it is not intended to replace or overlap the functions of Git itself or other tools such as the Git Extensions. Functions like view history, check in/out, switch branches will be left to Git Bash and Git Extensions. Eventually I will carefully add a few common used functions, like init and commit. But the door to Git and Git Extensions will be always there.

When asked if Git should be used instead of TFS, Sun says not necessarily. “Although TFS' source control is not as advanced as Git, you may want to take the chance of implementing TFS to adapt application lifecycle management. It benefits entire team, including developers, PM, BA and QA.” He continues,

If modern source control features such as flexible branching, merging, and disconnected development are definitely needed, I would recommend Git. But be aware that there is nothing yet for you to use TFS for ALM and replace source control part with Git and keeps source control checkins with WIT integrated. Also the Visual Studio tooling support for Git is almost blank.

The compiled version of the add-in is available in the Visual Studio Gallery. This is an open source project under the Microsoft Public License; the links to source code are available via CodePlex.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Its not like TFS doesn't have a solution by Francois Ward

[blockquote]
As teams become further and further separated, centralized source control systems like Microsoft’s Visual SourceSafe and Team Foundation Server quickly lose their appeal.
[blockquote]

I realize its not the same as how GIT works, but TFS supports proxy servers which make it work just fine, even if your team is in a billion different locations. Cost prohibitive, maybe, but from a technical point of view, it works fine.

Re: Its not like TFS doesn't have a solution by Jonathan Allen

I have found that TFS has a solution for everything, if you are willing to dive deeply into how it works and not just use the GUI tools. But at the end of the day I wonder if I should have pushed for a tier-1 tool like AccuRev or ClearCase.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

2 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT