Programming is hard by Stephan Schmidt

Hg versus Git - and why I did chose Hg

After my unpleasant experience with setting up Git, I’ve had some time to play around with Git and use it in a project. Git is really nice for a DVCS. What I like was the git status view, especially with colors turned on. Grouping added and modified files is much nicer than the Subversion style “A”, “D” (…) list. What I also like is that Git is fast. And not very difficult to use for day-to-day jobs, with tutorials like the Svn-Git Crashcourse. Killer features for Git are git rebase and especially branching. Git is different to other VCS that it uses revisions and branches as views to a directory. Other VCS - like HG and SVN - use different directories for different branches. This makes it much harder to jump between those branches. Git seems to have the biggest community, mindshare and momentum to become the next SVN/CVS.

What made it unusable for me was the Windows port. It just does not work reliable. Cygwin is a problem in it’s own. Msysgit isn’t up to par neither. I use a MacBookPro so Git works for me, but others who needed to access the repo from Windows were out of luck. Windows support isn’t very high on the list of Git priorities - perhaps because it’s linked to Linux kernel development.

Now to Mercurial. It seems to have the second biggest mindshare (more than bzr) after Git. Some big Java projects use it and there are some good blog posts about Mercurial. So I gave it a try. The setup was easy for a central server over http, it just worked after following the instructions. It’s command style is more like SVN than Git so the learning curve is even shallower than with Git. It works with Windows, the main reason for me the switch to Hg from Git. The downsides: SVN style hg status, no rebase and SVN style branches. Nice that hgignore is just a file in the repo and accessible by all developers (Maven target and generated files).

Should Git become usable under Windows, I’ll probably move again.

(My personal take is, SVN will become a DVCS by adding local repos, moving to hash revisions and eat the DVCS market)

Thanks for listening.

Update: I forgot about that post:

For Subversion 2.0, a few of us are imagining a centralized system, but with certain decentralized features. We’d like to allow working copies to store “offline commits” and manage “local branches”, which can then be pushed to the central repository when you’re online again.

If you liked this post, subscribe to my free full RSS feed.
Filed under: Java

You can share this post!
Do you want to tell others about this article? Use the social bookmark icons to submit this artice to the service of your choice. Thanks.

Get free updates by email

If you did like this article you can get free updates with your RSS reader, you can follow me on Twitter or get free update to new posts by email. Enter your email:

 
About the author: Stephan has been working as a head of development and CTO. He has experiences in different technologies since 20 years including Java, Rails and Python. Stephans main field of interest is maintainablity and productivity in software development. Want to know more? All views are only his own.

Comments

Stephan,

Could you provide examples of Git issues you ran into on Windows? I’ve been using it a bit with Msysgit and didn’t found any problems (except for my ignorance of git at first,…).

Thanks.

seiju

why the hell are you gonna want to use windows for developing?

What problems have you find using git in Windows? Here there is a gitcast’s episode about this topic: http://www.gitcasts.com/posts/git-on-windows

stephan

@seiju: I don’t know, how should I? As I’ve said I’m using a MacBookPro and have been using Macs for many years since the Cube, Linux since the beginning of the 90s.

@Eric, Blaxter: Thanks, we’ll take a look.

Leave a Reply