Git vs Mercurial vs SVN (Subversion)

Need advice about which tool to choose?Ask the StackShare community!

Git

296.9K
178.2K
+ 1
6.6K
Mercurial

232
218
+ 1
105
SVN (Subversion)

802
630
+ 1
43

Git vs Mercurial vs SVN (Subversion): What are the differences?

Key differences between Git and Mercurial and SVN (Subversion): 1. Distributed Architecture: Git and Mercurial both have a distributed architecture where each developer has a complete copy of the repository. This allows developers to work offline and independently, contributing to a faster and more efficient workflow. On the other hand, SVN follows a centralized architecture, where there is a single repository and developers need to be connected to the server to access the code. This can result in slower operations and limited offline capabilities.

  1. Branching and Merging: Git and Mercurial provide more advanced and flexible branching and merging capabilities compared to SVN. Both Git and Mercurial use lightweight branches, allowing developers to easily create and switch between branches for different features or experiments. They also offer efficient merging algorithms that can handle complex merge scenarios. In contrast, SVN uses heavy branches that are more time-consuming to create and switch between. Merging in SVN can be more error-prone and manual.

  2. Performance: Git and Mercurial tend to have faster performance compared to SVN, especially when it comes to operations such as committing, branching, and merging. This is because Git and Mercurial use local repositories and store changes as lightweight branches, whereas SVN requires communication with a central server for most operations. This can result in slower response times and decreased productivity for larger teams working with SVN.

  3. Ease of Use: Git and Mercurial are often considered more user-friendly compared to SVN. Both Git and Mercurial have intuitive command-line interfaces and provide graphical user interface (GUI) tools for ease of use. They also have better support for features like renaming files, moving files, and handling binary files. In contrast, SVN commands can be more complex and less intuitive, requiring a steeper learning curve for new users.

  4. Community and Ecosystem: Git has a larger community and a more extensive ecosystem compared to Mercurial and SVN. Git is widely adopted and supported by popular hosting platforms like GitHub and GitLab, which provide additional collaboration features and integrations with other tools. Mercurial has a smaller but still active community, while SVN has a more niche user base. The larger community around Git means there is a greater availability of resources, tutorials, and support.

  5. Data Integrity: Git and Mercurial have strong mechanisms to ensure data integrity, as they use cryptographic hashes to verify the integrity of each commit in the repository. This means that it is nearly impossible to tamper with or lose data in these systems. SVN, on the other hand, does not have built-in cryptographic hashes, making it more vulnerable to data corruption or tampering.

In summary, Git and Mercurial provide a more distributed architecture, advanced branching and merging capabilities, better performance, user-friendliness, and a larger community compared to SVN. They also have stronger data integrity mechanisms.

Decisions about Git, Mercurial, and SVN (Subversion)
Kamaldeep Singh

SVN is much simpler than git for the simple stuff (checking in files and updating them when everyone's online), and much more complex than git for the complicated stuff (branching and merging). Or put another way, git's learning curve is steep up front, and then increases moderately as you do weird things; SVN's learning curve is very shallow up front and then increases rapidly.

If you're storing large files, if you're not branching, if you're not storing source code, and if your team is happy with SVN and the workflow you have, I'd say you should stay on SVN.

If you're writing source code with a relatively modern development practice (developers doing local builds and tests, pre-commit code reviews, preferably automated testing, preferably some amount of open-source code), you should move to git for two reasons: first, this style of working inherently requires frequent branching and merging, and second, your ability to interact with outside projects is easier if you're all comfortable with git instead of snapshotting the outside project into SVN.

See more
Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Git
Pros of Mercurial
Pros of SVN (Subversion)
  • 1.4K
    Distributed version control system
  • 1.1K
    Efficient branching and merging
  • 959
    Fast
  • 845
    Open source
  • 726
    Better than svn
  • 368
    Great command-line application
  • 306
    Simple
  • 291
    Free
  • 232
    Easy to use
  • 222
    Does not require server
  • 27
    Distributed
  • 22
    Small & Fast
  • 18
    Feature based workflow
  • 15
    Staging Area
  • 13
    Most wide-spread VSC
  • 11
    Role-based codelines
  • 11
    Disposable Experimentation
  • 7
    Frictionless Context Switching
  • 6
    Data Assurance
  • 5
    Efficient
  • 4
    Just awesome
  • 3
    Github integration
  • 3
    Easy branching and merging
  • 2
    Compatible
  • 2
    Flexible
  • 2
    Possible to lose history and commits
  • 1
    Rebase supported natively; reflog; access to plumbing
  • 1
    Light
  • 1
    Team Integration
  • 1
    Fast, scalable, distributed revision control system
  • 1
    Easy
  • 1
    Flexible, easy, Safe, and fast
  • 1
    CLI is great, but the GUI tools are awesome
  • 1
    It's what you do
  • 0
    Phinx
  • 18
    A lot easier to extend than git
  • 17
    Easy-to-grasp system with nice tools
  • 13
    Works on windows natively without cygwin nonsense
  • 11
    Written in python
  • 9
    Free
  • 8
    Fast
  • 6
    Better than Git
  • 6
    Best GUI
  • 4
    Better than svn
  • 2
    Hg inc
  • 2
    Good user experience
  • 2
    TortoiseHg - Unified free gui for all platforms
  • 2
    Consistent UI
  • 2
    Easy-to-use
  • 2
    Native support to all platforms
  • 1
    Free to use
  • 20
    Easy to use
  • 13
    Simple code versioning
  • 5
    User/Access Management
  • 3
    Complicated code versionioning by Subversion
  • 2
    Free

Sign up to add or upvote prosMake informed product decisions

Cons of Git
Cons of Mercurial
Cons of SVN (Subversion)
  • 16
    Hard to learn
  • 11
    Inconsistent command line interface
  • 9
    Easy to lose uncommitted work
  • 8
    Worst documentation ever possibly made
  • 5
    Awful merge handling
  • 3
    Unexistent preventive security flows
  • 3
    Rebase hell
  • 2
    Ironically even die-hard supporters screw up badly
  • 2
    When --force is disabled, cannot rebase
  • 1
    Doesn't scale for big data
  • 0
    Track single upstream only
  • 0
    Does not distinguish between local and remote head
  • 7
    Branching and tagging use tons of disk space

Sign up to add or upvote consMake informed product decisions

- No public GitHub repository available -

What is Git?

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

What is Mercurial?

Mercurial is dedicated to speed and efficiency with a sane user interface. It is written in Python. Mercurial's implementation and data structures are designed to be fast. You can generate diffs between revisions, or jump back in time within seconds.

What is SVN (Subversion)?

Subversion exists to be universally recognized and adopted as an open-source, centralized version control system characterized by its reliability as a safe haven for valuable data; the simplicity of its model and usage; and its ability to support the needs of a wide variety of users and projects, from individuals to large-scale enterprise operations.

Need advice about which tool to choose?Ask the StackShare community!

What companies use Git?
What companies use Mercurial?
What companies use SVN (Subversion)?

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Git?
What tools integrate with Mercurial?
What tools integrate with SVN (Subversion)?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

Mar 24 2021 at 12:57PM

Pinterest

GitJenkinsKafka+7
5
2196
GitJenkinsGroovy+4
6
2781
GitCloudBees+2
5
4520
Git.NETCloudBees+3
7
1096
Mar 4 2020 at 5:14PM

Atlassian

GitBitbucketWindows+4
3
1153
GitNode.jsFirebase+5
7
2400
What are some alternatives to Git, Mercurial, and SVN (Subversion)?
GitHub
GitHub is the best place to share code with friends, co-workers, classmates, and complete strangers. Over three million people use GitHub to build amazing things together.
Bitbucket
Bitbucket gives teams one place to plan projects, collaborate on code, test and deploy, all with free private Git repositories. Teams choose Bitbucket because it has a superior Jira integration, built-in CI/CD, & is free for up to 5 users.
Perforce
Visibility, access control, workflow and code management for Git environments. Flexibility of collaborating on the same codebase and code reviews using any combination of Perforce and Git workflows and tools without compromise.
GitLab
GitLab offers git repository management, code reviews, issue tracking, activity feeds and wikis. Enterprises install GitLab on-premise and connect it with LDAP and Active Directory servers for secure authentication and authorization. A single GitLab server can handle more than 25,000 users but it is also possible to create a high availability setup with multiple active servers.
C lang
See all alternatives