What is version control ?

Version control is a system that records changes to a file or set of files over time so that one can recall specific versions later.

If still you don’t understand what version control is I know by now you might probably be thinking along the lines of ‘What is this thing?’, ‘Why should I care?’, ‘I’ll never use it in life?. If you think you haven’t used it you’re wrong. Very wrong. Prior to writing this article, I was shocked on learning that I had ever used a version control system on several occasions in my life. Honestly speaking I had not seen that coming.

For the sole purpose of understanding what version control systems are, I’ll categorize them into two groups:

1. Traditional version control systems

2. Modern version control systems

1. Traditional version control systems

a.) Local version control systems (LVCS)

I want to believe that at one point you have typed out a document and saved it in a folder (directory) somewhere on your computer. Much later on, you find yourself copying that document and saving it in a different directory so that you can make changes to your document without necessarily affecting the content of your original document. If this is you, then you have already used a local version control system. I believe that by now the definition of version control is sinking in your mind.

The Architecture

LVCs have a simple database residing in your local computer that keeps track of all the changes to files in your computer.

LVCs Architecture

2. Modern version control systems

I won’t blame you if you yet cling to classics. Classics are good and simple, modern is better and sophisticated.

Modern version control systems can further be broken down into two groups:

a.) Centralized Version Control systems(CVCs)

b.) Distributed Version Control systems(DVCs)

a.) Centralized Version Control systems(CVCs)

The Architecture

CVCs have a single(central) server that contains all the versioned files and a number of clients that checkout files from the central server.

CVCs Architecture

One of the shortcomings of using CVCs is that there is a single point of failure which is basically the centralized server

Examples of CVCs include: Subversion and Perforce

b.) Distributed version control systems(DVCs)

DVCs are the best version control systems that currently exist. They make it possible for anyone to FULLY leverage on the power of collaboration. Something that the former version control systems fail to fully implement.

The Architecture

In a Distributed version control system client computers don’t just checkout the latest snapshot of the files: they fully mirror the repository. If any server fails and the client computers were collaborating through it, then any of the client repositories can be copied back up to the server to restore it. Every clone is a full backup of all the data.

DVCs Architecture

Examples of Distributed version control systems include: Git and Mercurial

USE CASES OF VERSION CONTROL

1. Version control systems can be used by teams such as software developers to collaborate on a single project with each team member having a clone of the same project repository but modifying its contents individually.

2. Version control systems are also used to keep track of changes in a file.

3. With modern Version control systems one can one can revert back files to a previous state or revert an entire project back to a previous state at a particular time.

4. Version control systems also provide backup and recovery solutions for your files.