I’ve been using Git now for a few months almost exclusively. When I last blogged on it I’d been using it for but a few weeks. Since then I’ve come to the conclusion that it should be the de-facto choice for source control. This might be obvious to those of you that use Git on a regular basis, but there are obviously many people out there using other source control systems in the .NET world – I would guess primarily TFS and Subversion.
There are, to me, two main benefits to Git. Firstly, it’s incredibly lightweight to start using. There’s no requirement for using a source control server, so you can easily start using it for local projects. It’s also extremely quick – check-ins are virtually instant, whilst you can seamlessly switch between different revisions of code without any network connectivity instantly.
It’s also very powerful, with excellent branching and merging features; I’ve started using branching for features much more now, thanks to the ease of use in git and the aforementioned ability to quickly jump around the source tree. In TFS, getting an “older version” of code means checking out that version of code using a rarely-used dialog, or in SVN finding the particular version of code first, download that version to a separate folder etc. etc… In Git, with e.g. Git Extensions, all I do is visually look down the tree, see the version I want to look at, and open that revision. It’s no surprise that the overall TFS suite now supports Git for source control and VS has started to get some support for it as well.
Online source control repositories such as GitHub (free for public projects) and BitBucket (free for small projects) mean you can get up and running with a central repository to collaborate with others almost instantly.
Whilst on the subject of tooling – I’ve been using GitExtensions more and more and found it powerful and much easier to use than faffing with the command line.
There is indeed a learning curve for doing more than just basic check-in / get latest version of code – primarily around the ability to instantly move from one revision of code to another in the same physical folder – but once you “get” git, you’ll not look back.
In conclusion, if you’re using TFS or Subversion, I would seriously recommend looking at moving to Git for new projects – the productivity gain you can get from improving your release process e.g. Release branches, hot fixes etc. will make it worthwhile immediately in addition to the day-to-day developer gains.