Version Control Software in 2014: What are Your Options?

Share this article

Imagine software that creates checkpoints in your work and allows you to go back to those checkpoints when you want. This essentially means revisiting your work back in time. Once you are back to such a checkpoint, you can also deviate from the original path that you chose. This is exactly what version control systems do for you!

When using version control, the main code is present on one central repository or distributed over many repositories. Everyone working on the code has a local copy of what they are working on in their local or remote systems. This local copy may be a file, some files and directories or the whole repository, depending on the software. Version control system software helps in the management of this code. Besides that, non programmers can also use such software, for example, to manage documents.

In this post, I will offer a quick review of version control software options that we currently have at our disposal. Version control software is broadly divided into two categories — centralized and distributed. Centralized systems have a single central copy of the code on a server and developers commit changes to this central copy only. In distributed systems, every user has a copy of the code, with full history of the project.

Git

Git, which which is a distributed version control system, is arguably the most popular version control system today. It was developed by Linus Torvalds to address the issue of speed with existing version control systems. A wide range of organizations worldwide prefer Git to manage their code, as Git provides a huge range of features.

Git

With the emergence of popular websites like GitHub, GitLab, and BitBucket, code review using git has become very easy. That is why new organizations are choosing git over others.

Notable internet giants who use Git for version control are Twitter and Quora. In fact, Twitter’s open source work is on GitHub. As of March 2014, their Bootstrap project is the most popular repository on GitHub with about 67,000 stars and over 24,000 forks!

In case you’re interested in the philosophy behind the development of Git, here is a video of Linus Torvalds’ Google tech talk on Git. He talks of the issues with CVS and SVN and how Git solves these.

If you’re new to Git, you can try this beginners tutorial.

Subversion (SVN)

Subversion was created as an alternative to CVS (Concurrent Versions System), which has been around for about three decades. Thus, Subversion offers the best features of CVS with some improvements. Subversion puts emphasis on centralized code, whereas other popular version control systems today are “decentralized” (or distributed).

Subversion (SVN)

Although it overcomes a few of the deficiencies of CVS, Subversion has a few drawbacks of its own. Subversion is often found to be slow and lacks certain features of its counterparts. For instance, subversions branching lacks many features in comparison with Git or Mercurial.

With Subversion, branches are created centrally rather than in your local machine, which means there can’t be two branches with the same name. As Linus explains in his talk linked above, there can be branches from “test1” to “test5000” too, making it very difficult to understand! Subversion also implements renaming of files in a weird way. It makes a copy of the file or directory to the new name and deletes the one associated with the old name.

In recent years, many popular open source organizations like Rails and PHP have moved on from Subversion to Git.

Why would you want to use Subversion over Git or Mercurial today if large organizations are moving away from it? Subversion enables you to restrict the access to certain directories for specific users using the path based authorization. The same structure is also possible in Git, but you would have to split your main repository into many smaller ones and restrict access to one of the required smaller repositories. This makes the whole process a bit complex.

For an intro to Subversion you can check out this free book, available online in HTML format or as a PDF.

Mercurial

Mercurial, much like Git, is a free and distributed open-source system. Mercurials main objectives are high performance, scalability, along with advanced branching and merging capabilities. It has advantages similar to those of Git, but there are certain disadvantages too.

Mercurial

Although it started out at roughly the same time as Git, Git has the edge at present. One organization that has shifted from a Subversion server (with a Git mirror) to Mercurial is Facebook. The main reason they chose mercurial over Git is Mercurial’s clean, modular, Python code that was easier to extend. As a result, Facebook engineers contribute actively to Mercurial.

If you prefer Mercurial over Git, you can host your code on BitBucket.

For a beginner’s tutorial on Mercurial, you can check out Hg Init.

Notable Mentions

Although we have covered the most popular version control systems, there are quite a large number of such systems. One, already mentioned, is CVS (Concurrent Versions System), which has been around since the 80s. It was widely used until the emergence of Subversion and Git. CVS allowed users to register their changes on a first-come first-serve basis and allowed only the latest version of the code to be worked upon and edited. This meant that you needed to commit your code first if you didn’t want to incorporate everyone else’s changes!

Another version control system that I should mention is Perforce. This is a commercial version control system, used by companies like NVIDIA and Ubisoft. Perforce also has a Git plugin to integrate with your existing Git repositories.

Yet another option is Bazaar. Like Git and Mercurial, Bazaar is a distributed version control system and is promoted under the the tagline “version control for human beings”. If you are interested, you can check out their well written documentation.

Conclusion

As evident from this list, you have a lot of options when it comes to version control systems. What you choose to use is largely up to your requirements and to a certain extent, your taste. Generally, people will opt for the system that they have some experience with already. And I should note that many other services like Google Docs provide basic revision control and you should consider a simpler service like that if your needs are minimal.

If you have experience with any alternative options for version control, please let us know in the comments.

Frequently Asked Questions about Version Control Software

What are the key features to look for in a version control software?

When choosing a version control software, there are several key features to consider. Firstly, it should offer a comprehensive version history, allowing you to track changes and revert to previous versions if necessary. Secondly, it should provide robust branching and merging capabilities, enabling multiple developers to work on different parts of a project simultaneously without conflicts. Thirdly, it should have a user-friendly interface that makes it easy to navigate and use. Lastly, it should offer strong security measures to protect your code from unauthorized access.

How does version control software improve collaboration among developers?

Version control software plays a crucial role in facilitating collaboration among developers. It allows multiple developers to work on the same project simultaneously, with each developer working on a separate branch. Once a developer completes their work, they can merge their branch back into the main codebase. This ensures that everyone is working on the most recent version of the project, reducing the risk of conflicts and errors.

Can version control software be used for projects other than software development?

Yes, version control software can be used for a variety of projects beyond software development. It can be used for managing any type of digital content that requires versioning, such as documents, images, and web pages. This makes it a valuable tool for content creators, designers, and other professionals who need to track changes and maintain a history of their work.

What are the differences between centralized and distributed version control systems?

Centralized version control systems (CVCS) have a single, central repository where all changes are stored. This means that every change made by a developer is directly made on this central repository. On the other hand, distributed version control systems (DVCS) allow each developer to have their own local repository, where they can make changes and commit them locally before pushing them to the central repository. This allows for more flexibility and can improve performance, especially for large projects.

How does version control software help in bug tracking and fixing?

Version control software can greatly aid in bug tracking and fixing. By maintaining a detailed history of all changes made to the codebase, it allows developers to easily identify when and where a bug was introduced. They can then revert to a previous version of the code if necessary, or use the information to help fix the bug. Additionally, many version control systems integrate with bug tracking tools, further streamlining the process.

Is it possible to use multiple version control systems for a single project?

While it’s technically possible to use multiple version control systems for a single project, it’s generally not recommended. Using multiple systems can lead to confusion and inconsistencies, and it can make it more difficult to track changes and manage versions. Instead, it’s usually best to choose one system that best fits the needs of your project and stick with it.

How does version control software handle conflicts?

When multiple developers are working on the same project, conflicts can occur when two or more developers modify the same part of the code. Version control software handles these conflicts by alerting the developers involved and providing tools to resolve the conflicts. This typically involves comparing the conflicting changes and deciding which ones to keep.

What is the role of version control software in continuous integration and continuous delivery (CI/CD)?

Version control software plays a crucial role in continuous integration and continuous delivery (CI/CD). It allows developers to frequently commit their changes to the codebase, which can then be automatically built and tested. This helps to catch and fix bugs early in the development process, and it ensures that the code is always in a releasable state.

Can version control software be used for binary files?

Yes, version control software can be used for binary files, such as images, audio files, and compiled code. However, because binary files are not text-based, they can’t be diffed and merged in the same way as text files. This means that version control systems may handle binary files differently, and some systems may be better suited to handling binary files than others.

How does version control software contribute to software quality?

Version control software contributes to software quality in several ways. By tracking changes and maintaining a history of the codebase, it allows for better accountability and traceability. It also facilitates collaboration and reduces the risk of conflicts and errors. Additionally, it supports practices such as continuous integration and continuous delivery, which can help to catch and fix bugs early in the development process.

Shaumik DaityariShaumik Daityari
View Author

Shaumik is a data analyst by day, and a comic book enthusiast by night (or maybe, he's Batman?) Shaumik has been writing tutorials and creating screencasts for over five years. When not working, he's busy automating mundane daily tasks through meticulously written scripts!

cvsgitgit svnmercurialrevision controlsubversionSVNvcsversion control
Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week