Git, Mercurial and Bazaar – A Comparison

Open-source Version Control Systems have come a long way since the days of CVS. SVN, one of the most successful VCS to be ever used,  is now loosing its ground to a new genre of VCS known as DVCS or Distributed Version Control Systems. A DVCS or Distributed Version Control System is a version control software where each working copy contains the full history of all the revisions, thereby making it a fully functional code-base repository and a remote backup to the original code-base. With the increasing size of teams working on the same code-base, the need for DVCS was apparent. We are going to compare the three most popular open-source DVCSs – i.e. Git, Mercurial and Bazaar.

Some early DVCS were BitKeeper and Monotone. The Linux Project can be credited for the creation of two of the most popular DVCSs, i.e. GIT and Mercurial. The Ubuntu development group later joined in by the creation of Bazaar.

Git was created after BitKeeper, the original Linux Kernel DVCS, decided to restrict its licensing. It was created by Linus Torvalds himself and targeted at high performance and an extensive set of advanced features. As a mater of fact,  another very popular Open-source DVCS called Mercurial was created because of BitMover’s (company behind BitKeeper) decision to remove the free version. Mercurial was written in python. It was initially meant to run only on Linux  but was later ported to Windows. The Ubuntu community with the backing to Canonical Limited, created their own DVCS called Bazaar. It was later Open-sourced along with the LaunchPad platform for hosting repositories.

Let us see some of the similarities among the three

  1. The License: Not to forget! The most important thing while considering the use of any software is “the License”. Git, Mercurial and Bazaar are all licensed under the GPL.
  2. Support for Atomic Commits: It is an operation in which a set of distinct changes is applied as a single operation and when the changes are applied the atomic commit is said to have succeeded. All of Git, Mercurial and Bazaar support this vital feature.
  3. Support for Symbolic Links: All the three have support for symbolic links
  4. Pre and Post event hooks: All of them support Pre and Post event hooks making them extremely useful in staging and deployment scenarios.
  5. Merge Tracking: The three of them support Merge Tracking
  6. Revision Tags: All of them have support for Revision Tags
  7. RCS Keywords: Git, Mercurial and Bazaar have support for standard Revision Control System Keywords
  8. Interactive commits: Interactive commits allow the user to cherry-pick the patch-hunks that become part of a commit, instead of having only a file-level granularity. All of the three support Interactive commits.
  9. External References: The three allow embedding of foreign repositories in the source tree, i.e. support for external reference.

Now for the differences in the three:

  1. Basic Binaries Structure: Git, the most powerful of the three, is more of a tool-set (git-pull, git-merge, git-checkout etc which form the git-core) than a single binary which supports DVCS commands, where as Bazaar and Mercurial are single monolith binaries with command arguments performing various DVCS actions.
  2. Ease of Use: For a beginner who is new to Version Controls Git will definitely seem much more confusing than the other two, and one has to go through all the VCS jargon like merging, branching, tagging etc to have a grip over Git. On the other hand Mercurial and Bazaar are quiet easy to catchup and understand. Although both have advanced features, they are neatly abstracted under a simpler command structure.
  3. Power to the User: Git seems to be the most powerful out of the three in-terms of the flawless set of features it provides. The very reason why some of the biggest projects like to use Git. In-fact Git was designed to be powerful.
  4. Performance: In terms of raw performance, Git leads almost all benchmarks followed by Mercurial and then by Bazaar. A detailed benchmark can be found here.
  5. Final Repository Size: Again Git stores wins here, with the least size of the Final Repository. It is followed by Bazaar and then by Mercurial. Reference: GitBenchMarks
  6. Network Protocols Supported: Git has support for 3 protocols HTTP/HTTPS, SSH and the GIT protocol. Mercurial supports 2 of them HTTP/HTTPS or SSH.  Bazaar supports HTTP/HTTPS and SSH by default, but with plugins it can also support SFTP and RSYNC protocols.
  7. Design Differences: Mercurial and Bazaar are FILE LEVEL VCS as they store versions of files but GIT is a CONTENT LEVEL VCS i.e.  it stores delta of content, not the file itself: two files with the same content will be stored only once.
  8. Repository Hosting: For open-source and private repository hosting both Mercurial and Git are way ahead of Bazaar in-terms of number of Source code hosting providers available. When there are more than 9 hosting providers for Mercurial and about 8 hosting providers for Git, only 3 hosting providers are available for Bazaar.
  9. Usage by Popular Open-source Projects: When there are about 11 popular Open-source projects which are version controlled by Bazaar, there are about 29 popular projects which use Mercurial as a VCS and more than 65 popular projects which use Git as their Source Control.
  10. Free Private Repository Hosting: For coders looking to host their private projects for free, Mercurial has BitBucket which provides a whopping 1GB for hosting single Private repository. for Git there is Unfuddle which provides 200 MB for a single project with multiple repository support.  Git also has ProjectLocker which provides about 500 MB space for unlimited repositories though with a messy Web UI. I couldn’t find any similar service providers for Bazaar though.

The Conclusion: If you are a big group of professional coders working on a huge project with lots of moving parts Git is the best open-source DVCS out their for you guys, but if your team has trainees and noobs then Mercurial or Bazaar is what you should go for. Again if you are working on a project closely related to the Ubuntu project launchpad should be your platform and Bazaar should be your DVCS.

This entry was posted in Comparisons and tagged , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

22 Responses to Git, Mercurial and Bazaar – A Comparison

  1. Pingback: Tweets that mention Git, Mercurial and Bazaar – A Comparison | TechTatva --

  2. Michael Munsey says:

    According to the link, Mercurial has better performance than Bazaar in almost all categories.

    • techtatva says:

      I guess point 4 and 5 got mixed up. Thanks for pointing out the error. Its corrected now.

      The TechTatva Team

  3. Pierre says:

    Are you really sure Git stores delta of content ? To my knowledge it stores blob which are content of file without the metadata associated with it.

    • techtatva says:

      Yes it stores the Blob Objects which are the content of the file without the metadata. Git only tracks contents at a whole tree-level. All the changes to the tree (additions, deletes, renames, edits etc) are implicitly encoded in the delta between the two states of the tree; you just track what is the content.

      The same has been discussed in detail here:

    • Jakub Narębski says:

      Git uses (binary) deltas in packed format, but this is backend issue: on the level of API “blob” objects represent contents of file; the relevant metadata (filename, executable bit etc.) are stored in appropriate “tree” object representing directory.

  4. ralph says:

    When I first tried using git, it was very confusing and I hated it. Then I started using github, and I’m now officially hooked on git.

    Github made my introduction to Git a lot smoother by way of useful, pervasive documentation (how to import from SVN, add remotes, push, pull, merge, etc) and a friendly interface. I don’t bother with TortoiseGit or other GUIs because Github obsoletes them.

    Now having used git a while, I don’t really feel the need to check out mercurial or bazaar – git does everything I need. And picking up bazaar or mercurial is probably much easier now that I can feel my way around git.

    Thanks for the article and best wishes

  5. Jakub Narębski says:

    You have history a bit mixed up (or just a bit unclear for me): both Git (by Linus Torvalds) and Mercurial (by Matt Mackall) were created nearly concurrently in response to so called “BitKeeper fiasco” (see e.g. Note that though Mercurial is written mainly in Python, it contains some code in C for better performance.

    Bazaar (formerly Bazaar-NG) was AFAIK open source from the very beginning; it is only Launchpad that was closed-source and open-sourced (AGPLv3) only lately.

    • techtatva says:

      You are absolutely correct. “Git was created after BitKeeper, the original Linux Kernel DVCS, decided to restrict its licensing. It was created by Linus Torvalds himself and targeted at high performance and an extensive set of advanced features. As a mater of fact, another very popular Open-source DVCS called Mercurial was created because of BitMover’s (company behind BitKeeper) decision to remove the free version. Mercurial was written in python. “. This is that part I am trying to communicate the exact same points you are mentioning.

      The time-frame when both Git and Mercurial were created was almost the same as a matter of fact Mercurial was also created to work as the DVCS for Linux. (

      You are also correct regarding Bazaar and Bazaar-NG. It was open-sourced in 2005 before which they had a primitive ancestor known as Baz.

    • techtatva says:

      If platform support is considered then both Mercurial and Bazaar are ahead of Git may be that is because the Git community is not very interested in porting to several platforms. As a matter of fact most OSS using Git are for Linux or are platform agnostic. Yes there is msysgit which can run Git on Windows also

  6. Pingback: 版本管理系統的戰國時代 | bossliaw

  7. It’s appropriate time to make a few plans for the longer term and it is time to be happy. I’ve read this publish and if I could I want to recommend you some attention-grabbing issues or suggestions. Perhaps you can write next articles referring to this article. I want to read more things about it!

  8. hi!,I love your writing very much! percentage we keep in touch more about your post on AOL?
    I need a specialist on this house to solve my problem.
    May be that’s you! Looking forward to peer you.

  9. Appreciating the time and energy you put into your site and in depth information you present.
    It’s good to come across a blog every once in a while that isn’t the same
    unwanted rehashed information. Wonderful read!
    I’ve saved your site and I’m including your RSS feeds to my
    Google account.

  10. After I originally commented I seem to have clicked the -Notify me when new comments are added- checkbox and now
    each time a comment is added I get 4 emails with the exact same comment.
    Is there an easy method you can remove me from that service?

  11. Amazing things here. I am very happy to look your post.

    Thanks a lot and I am having a look ahead to
    touch you. Will you please drop me a e-mail?

  12. marniedal says:

    Hi, my name is Marnie Dalby!

    I`m a professional writer and I`m going to change your lifes onсe and for all
    Writing has been my passion since early years and now I can`t imagine my life without it.
    Most of my books were sold throughout Canada, USA, Old England and even India. Also I`m working with services that help people to save their nerves.
    People ask me “Please, Marnie Dalby, I need your professional help” and I always accept the request, `cause I know, that only I can solve all their problems!

    Professional Academic Writer – Marnie – //]Prospectfinearts Team

  13. ct245.aspx says:

    e his dream move in the summer as the deal appears to be further along than first thought.

  14. CurtisSoync says:

    wayfcoin com – wayfcoin com отзывы, wayfcoin com отзывы

  15. rufus says:

    Welcome to my blog ! I’m Rufus Laing.
    Even though I jokingly credit my aunt for my writing talent, I know that it is a ability I have fostered from childhood. Though my grandmother is a writer, I also started out young.
    I’ve always had a way with words, according to my favorite professor . I was always so excited in science when we had to do a research writing assignment.
    Now, I help current pupils achieve the grades that have always come easily to me. It is my way of giving back to students because I understand the troubles they must overcome to graduate.

    Rufus Laing – Academic Writer – Confederation

Leave a Reply

Your email address will not be published. Required fields are marked *