Mercurial and Git are two of the most popular distributed version control systems. But which of them is better, and why? This is an old argument, with gazillions of forum posts of software developers arguing their case, offering pros and cons.
That is because their feature sets are so similar, yet their strengths and weaknesses make them ideal for different use cases. Read on for a list of pros and cons for both Git and Mercurial.
User opinions about Git
Based on forum discussions, it is clear that Git is overly complex in every sense of the word. In particular, the information model and the command line syntax as well as the help documentation – none of it is easy to understand. Most commands lead to further commands, and simple actions can require complex actions to undo or refine.
The decision about whether to use Git on a development project or not is primarily a question of how knowledgeable and experienced your team is with Git. A single weak link can bring down the entire team. The obvious example of this is seen in Git's version control: it is, simply put, unsafe and prone to accidental alteration by users (potentially affecting the entire team). Therefore, a minimum level of solid knowledge is necessary.
Git puts control firmly in the hands of your project manager (or whoever is maintaining the codebase). The problem with this is that the majority of Git users are coders (contributors) and what they need most of all is a clean interface. This is where Git fails to deliver, putting functionality over usability, and favoring the PM over the contributor.
Git vs Mercurial
When comparing Git to Mercurial, there are a couple of important points to note:
- Both Git and Mercurial's way of handling history is essentially just a directed acyclic graph. However, Mercurial provides you with a simple linear history that can cause confusion due to the lack of information. Git, on the other hand, enables you to follow the history backwards, but this is complicated and hard to follow.
- Git is often believed to handle branches better than Mercurial. Git's branch structure helps you avoid merging code in the wrong place.
- Git enforces technical excellence. Simply put, if you are not a Git expert, it's probably a good idea to use Mercurial or get some training before starting to work with Git.
- Git is more powerful for larger projects. One good example of its superior feature set is “partial checkouts”.
- Last, but not least, the biggest non-technical difference between Mercurial and Git is in their marketing. So if Git seems to be better in all aspects, you might want to keep that in mind.
codeBeamer ALM supports both Git and Mercurial, and in addition to version control, gives you a powerful toolset across the lifecycle. To learn more about this integrated Application Lifecycle Management platform,