Subversion and Git are the two dominant SCM systems in use today. Collectively they represent more than 85% of the open source projects and around 60% of the enterprise (private development) market. The numbers vary a bit depending on which survey you read, but the trends are clear. So how do you choose between Subversion and Git?
Much has been written about this topic already, and those of us who follow the SCM space could spend a very long time debating different features. I’m going to throw in my 2¢ with a focus on the things that matter most in large enterprise deployments.
Git is a distributed SCM system. Subversion is not. Though this may seem like a substantial advantage for Git, it matters much less in the enterprise than it does for personal projects or at smaller shops. In the enterprise, Git is deployed a lot like Subversion, with master repositories that are secure, highly available, and controlled. Local operations in Git are faster; it’s easier for a small team to stand up a new Git repository for a skunk works project, and it’s easier for a road warrior to work from their laptop for a few days, but otherwise the central model of Subversion is not a key limitation.
Subversion is very good at the mainline model but can be used in a lot of other ways. Git supports the mainline model, some workflows based on the pull request concept, and a stream-like workflow known as Git Flow. Tool selection in this area largely boils down to a matter of how you prefer to work.
If you collaborate frequently with teams outside the firewall, then Git is a solid choice. History in Git is not tightly coupled to a particular repository, making it very easy to push and pull changes between repositories on separate networks and even do it via sneakernet.
Maturity and the Cool Factor
Subversion has been around longer than Git and is widely used in large deployments. It’s a proven tool with a solid feature set. It has a few shortcomings but in most situations it just works. Subversion administrators know how to deploy, configure, secure, and maintain their systems.
Git is less of a known quantity in the enterprise, although that’s changing rapidly. Some of the enterprise parts of Git are still evolving (although the introduction of Git MultiSite has helped a lot), but Git is riding a wave of popularity, and that matters too. The next generation of developers is growing up on Git: they know it and prefer it.
Subversion and Git are both very easy to learn for daily use and have good tool and plugin support, but Git’s learning curve gets very steep once you’re past the basics, and not every Git feature is exposed through a GUI.
Community and Future
Both Subversion and Git benefit from a strong open source community with commercial sponsors. Although the Git community has the momentum, both tools will be strong and viable for many years.
The Choice is Yours
Subversion and Git are powerful SCM tools that have different strengths. Whichever you choose, you can feel confident that the software and its community will be around for many years to come. And if you’re using CVS or some other legacy SCM system, there’s no better time to move to one of the two powerhouse open source choices.