What is Revision Control?

This is a brief introduction to revision control for non-technical readers who may not have encountered it before. Reading this in conjunction with our introductions to test-driven devlopment and refactoring will start to give you a flavour of the Codeface approach to developing rock solid software and web applications.

A brief introduction to revision control

Revision control (also known as ‘version control’) is an essential part of any web developer's toolkit.

A revision control system such as GIT or Subversion gives us a way to keep track of changes to files on a project.

When a file is first created, it's given a version number of 1 (or something else like 1.1 - depending what numbering system is being used), and any developer who wishes to make a change can 'commit' (or 'check in') a new version of the file when they've finished tinkering with it. This new version of the file would automatically be assigned a version number of 2, and the coder who made the change would also add a helpful little comment about what they've done (e.g. “I've updated the layout of the homepage”).

There are many benefits of a good revision control system:

  • Several team members can work on the code at once - typically on different parts of the project (although all modern revision control systems are cleverly designed to allow different people to edit the same file at the same time)
  • Getting the code back to a ‘known state’ - by 'tagging' all the files at a particular point in time (e.g. on the day we launch your new website), we can effectively get a reliable snapshot of the project at all the key moments in its history.
  • Taking responsibility for our code - when there are multiple people working on a project, a revision control system allows us to see who did what and when (and why!)
  • What's the difference? - it's easy to compare two versions of a file, (or two versions of a set of files across a whole project). This makes it easy to review all changes before an important deployment, or review what's changed in a particular file during testing and debugging.

Open source revision control systems

Back in 1999 when Codeface first opened for business, we used CVS (the “Concurrent Versioning System”) for all our version control. Since then, many different systems have come in and out of fashion. We currently use Subversion, GIT and Mercurial.

Subversion behaves a lot like CVS but offers solutions to some of the limitations of CVS. GIT uses a radically different approach (it's a distributed revision control system and is very popular in the Ruby on Rails community.

CVS is no longer being actively developed but is maintained and is still widely used (and we continue to use it alongside those newer systems).

Getting a project under revision control is one of the first steps in our Outsourced Code Refactoring service.