What is version control?

What is version control?

In it’s simplest form, version control systems record and store multiple changes to files, so you can revert to a specific change point in the file or project's history. Some version control systems, such as Subversion, track the history of individual files, while others, such as Git and Mercurial, track the history of whole repositories.

Version control is like a safety net. It means, if you make changes that causes issues later, or that you decide you don’t wish to keep, you can revert a file or an entire project back to a specific point instead of having to start the whole thing from scratch.

One of the most basic, and possibly the most frequently used examples of version control is local versioning. Although it's so frequently used, the majority of users won’t generally notice local versioning in their day-to-day computing as it is simply another in-app function.

Every application, from office applications to creative software has at least a basic level of local versioning, comprised of the 'undo' and 'redo' functions. Some applications, such as Microsoft Office and Google docs, take this a step further and offer more complex functions such as version comparison, and commenting.

In-app version control systems are obviously limited by the types of files they support, and in the amount of change history they can store. By contrast, standalone version control systems can focus on more complex functions, store infinite version histories, and are not limited to specific file formats - though some systems are more suited to specific files. For that reason, version control systems have become most popular within code related industries such as software, game, and web development. Though they can be used to manage versions of any file, from basic word documents through to huge graphics files.

Generally speaking, version control systems fall into one of two categories: Distributed version control systems, and centralized version control systems. Both have distinct benefits and downfalls that make them ideal for different workflows, and there are many different systems in each type, with the most popular being Git, Subversion, and Mercurial. Let's take a look at the main differences between Distributed version control, and Centralized version control.

Distributed version control

Distributed version control - also known as distributed revision control - is peer-to-peer based, with each peer having their own clone of the repository. As this approach essentially mirrors the entire history of the codebase, any fatal corruption of the initial, server-side repository can be fully restored from any one of the multiple clones. In a standard workflow, however, changes to the repository do not update the repository in its entirety, and instead patch changes from peer-to-peer, which results in speedy operations without the requirement to contact a server.

Distributed version control is probably the most well-known type of control system, thanks to the systems Git and Mercurial, which are the most widely adopted for collaboration and open-source projects. Because of the way it is setup, cloning the entire codebase of a project to each peer system, it allows for more freedom when it comes to both workflows and collaboration.

Centralized version control

Unlike distributed and local control systems, data in Centralized version control systems (CVC), such as Perforce and Subversion, are stored in server-side repositories. This means each peer checks out files and commits changes to the central location.

The obvious concern here is with data availability. As the files are stored in a central location, should a server go down, or require maintenance, no work can be committed to the main branch until the server is back up and running. What’s more, should the server corrupt - without a proper backup - all the data would be lost in its entirety.

The caveat here is control, and data security, as having your data stored in a single location makes it a lot easier to maintain and restrict user access.

Conclusion

Version control is a convenient way to manage changes to your files and projects. Although version control systems are primarily seen as tools to manage software projects, they can prove vital to managing any type of file.

If you'd like to learn more about version control systems, start your journey by checking out our SVN tutorial.

Want to learn more about how different version control systems differ from each other? Read Git vs. SVN and Git vs. Mercurial.

Seamless software development.

Code management and collaboration platform with Git, Subversion, and Mercurial.

Sign up for free
comments powered by Disqus