views:

533

answers:

6

I am now in a condition to choose which Version Control System, so I would like to get some comment from experience developers who have used these. Which one i should use and in what condition?

A: 

To be fair, I have limited experience with Git and none with Hg, but one thing I miss about svn, perforce, etc the few times I do use it is a nice low integer revision number I can report to other developers.

Otherwise, Git has been pretty fantastic; it simplifies branching, which I use a ton, and usable offline, which is very nice when developing on my laptop.

Also, Github = Awesome.

Todd Gardner
Just tag it (properly) at least once, and use `git describe`
Dustin
+5  A: 

Remember that Git and Mercurial are both DVCS (Distributed Version Control), which is quite different than a Central VCS. See the core concepts SO question to get the differences.

Otherwise, you can also refer to Eric Weblog, where "Git is Wesley Snipes. Mercurial is Denzel Washington" ;)

I chose Bazaar and Git for the experience. But if I were choosing a DVCS as a regular user, I would choose Mercurial. [...]
People admire Denzel Washington. But Wesley Snipes is simply more interesting.

Personally, I find Git more intuitive in term of branching and repository cloning, but Hg has better support on Windows (although I am pretty much content with msysgit)

See also "Difference between Git and Mercurial" SO question, in particular:
"Git is MacGyver and Mercurial is James Bond" ;)

VonC
What's that "better support on Windows"? msysgit works pretty well as you said and there's also a TortoiseGit.
Wernight
+7  A: 

Google Code recently chose Mercurial over Git for their system. In their analysis they found that Mercurial

  • had an easier learning curve
  • had good Windows support
  • was easier to maintain
  • ran faster over HTTP

see http://code.google.com/p/support/wiki/DVCSAnalysis

hyperslug
Pretty strange considering Google code is overseen by the SVN guys.
mP
I believe that there was an argument that the Google analysis was rather dated.
sybreon
I think that the last argument was deciding one (faster HTTP, but requiring Mercurial installed on remote side).
Jakub Narębski
There is also the fact that Hg uses Python architecture. This added to the stateless HTTP of Hg, makes it way closer to Google architecture.In short it means Hg is easy to implement for Google with high performance.This also means that Google's arguments to chose Hg are probably irrelevant for you to chose Hg over Git.
Wernight
+2  A: 

Both are quite robust and versatile. Look at what colleagues and upstream projects are using, since using the same VCS makes collaboration easier.

As an open source developer, you will inevitably have contact with all the commonly-used VCS'. Looking at what systems various projects have chosen could be helpful. Python, Mozilla, OpenJDK are Mercurial users. Many smaller projects use Git, especially in the web space. And of course if you are doing kernel stuff you will want to use Git.

I use Git for my software projects and also to version my documentation, and am quite happy with its robustness and usability, ease of branching and merging, etc.

Mercurial (with which I have limited personal experience) has better portability (windows etc).

Eric Drechsel
Besides Linux Kernel, Ruby on Rails and Perl also use Git.
jpartogi
+2  A: 

The GitHub folks have recently released a beta version of Hg-Git which purports to seamlessly bridge the gap between these two version control systems:

This is the Hg-Git plugin for Mercurial, adding the ability to push to and pull from a Git server repository from Hg. This means you can collaborate on Git based projects from Hg, or use a Git server as a collaboration point for a team with developers using both Git and Hg.

With the robust backend data stores in both Mercurial and Git, I think the line between these two competing version control systems will become quite blurred in the near future.

Greg Hewgill