UPDATE 15/01/2012: I have written a related post here: Why I prefer BitBucket over GitHub

Distributed Source Control Systems (DVCS) are taking off (and have done for quite some time) and are becoming quite popular especially within the community where there are large numbers of contributors. More recently large enterprises have been seen to be adopting DVCS over regular source control systems like Subversion, CVS and TFS, this doesn’t mean they are making the right decisions. More on this in another post, but I thought I’d talk about bitbucket.org.

Bitbucket.org is a free source code repository portal for non-commercial use for a max of 5 contributors, it supports more at cost. Bitbucket supports both Mercurial and Git DVCS.

If you have never heard of DVCS then I suggest to start learning about it by reading this.

If you’ve heard of GitHub (if you haven’t, then you have probably been living under a rock for the last year) then Bitbucket is similar except it not only supports Git but Mercurial repositories as well.

GitHub and Bitbucket alike are the new SourceForge, Google code and CodePlex of today.

I like Bitbucket as not only does it support both Mercurial as well as Git, it also has support for custom domains. All you have to do is create a custom CNAME record for your internet domain name (DNS) to point to bitbucket.org. Then when that domain is hit, Bitbucket redirects to your repositories. For example I have set mine to http://code.simonrhart.com

The configuration in Bitbucket:

I think that is a killer feature. I will see if I can get http://code.smart421.com configured, or perhaps http://git.smart421.com

I have created a single repository called MVC 3 Examples. If you are a Git guru, simply clone that repository at:

 $ git clone https://bitbucket.org/simonrhart/mvc-3-examples.git 

If you are a Microsoft person with Visual Studio, simply download the Git tools here: http://code.google.com/p/msysgit/

Once you have done that, run the above Git command and you will have access to the entire repository. The repository is a work in progress. I plan to add more stuff to it as well as many other repositories mainly for learning. Right now, there is an example on how to write and test Action Filter providers for Inversion of Control container StructureMap in MVC 3.

One thing I will say about Git is it has a very steep learning curve. All I can say is keep using it and you will understand it! It’s one of those tools/technologies that you have to keep using it in order to understand it. I actually quite like Git, there was a time when I hated it. I have to say it doesn’t compare to TFS, however – although there are a couple of features in Git that I’d like to see in TFS one is the branch graph. Id like to see which changeset I branched from like I can with Git – that feature is a killer feature.

Once you have mastered Git, install Git Extensions downloadable from Google code as it happens! Git Extensions is a Visual Studio plugin as well as a standalone application that attempts to make your Git experience better which I believe it does.

If you are new to any DVCS, learn the raw commands first, then use the extensions.

More on Git, Mercurial in future posts…as well as TeamCity -> BitBucket. Watch this space…