Source code management systems (Git, Mercurial, etc.) pros cons of each?

I was wondering if someone could tell me what management systems are popular right now and the pros/cons of each. I read somewhere about a new set of systems coming out that are a mixture of Git and Mercurial type systems. I've never used one before but I've heard good things about Git and Mercurial, and bad things about the old ones like SVN. Links to sites that have comprehensive overviews are welcome.

Posted May 25, 2012, 4:53 PM UTC

69
i8beef•

Git and Mercurial are pretty interchangeable. In fact, there are modules for each that will allow you to use them interchangeably, for the most part.

Mercurial has better tooling on Windows (TortoiseHg) and Git is a bit more command line / linux oriented. If you are doing Windows development, I'd recommend Mercurial over Git.

If you want to share on GitHub, go Git. If you don't care, BitBucket supports both Git and Mercurial.

Both Git and Mercurial are DVCS instead of CVCS systems (like SVN). This means you download and maintain a complete copy of the repository instead of just a particular version of everything (like SVN). It means essentially any copy of the repository is a complete backup, whereas with SVN you would need to backup the centralized server's repository to get the same. That's one of the biggest advantages.

Of course, if you are storing a bunch of large binaries in Git and Mercurial with many versions, this means your repository is increasing in size very quickly. SVN is better for collections of binary files. Essentially: Git / Mercurial for code, small binaries that don't change often, and SVN for large binaries and binaries that change really often (within reason...).

9
doctorsound•

Github released a GUI for Windows this week. It's darn easy.

5
flammable•

I just wanted to add that the GUI is incredibly sexy and at least a hundred times better for a beginner than the standard git :)

2
[deleted]•
3
HandOfCodeOP•

Ah thank you, I missed the FAQ, 24 hours awake hunting down memory leaks in VB6 will do that to you. (Yes, memory leaks in a managed language, thankfully it appears it's not my fault!)

2
rl_at_work•

To some extent, as with most answers you'll find here, it depends. Certainly GIT has become more popular in the last few years, supplanting Subversion, which superseded CVS, which replaced RCS. If you want to work on a joint project with multiple people providing code or simply want a copy of a common project to hack on, go with the system they are using. If you just need a simple way to track the changes in a few pages and you're the only one working on it, the original Revision Control System will work just fine.

For my part, I have worked with many of different systems and am happy enough with GIT currently. The tools have certainly changed over time and get modified but the basic concepts of revision control, merging and code management have not. Once you learn the purpose of the tool, you may be better able to choose the correct one for you needs.

2
FlightOfStairs•

Both git and mercurial have huge advantages over older, non-distributed systems. I recommend watching Linus' excellent presentation on git. http://www.youtube.com/watch?v=4XpnKHJAok8

I personally favour git for slightly easier branching/merging, and I think that the principle that there is no implicit HEAD makes sense. There's not much between them; use what's supported by systems and people you want to interact with.

2
16dots•

I went with Morgan Freeman --- svn.

1
Kernes•

I would start with SVN. It is the simplest one.

-2