Branching

Version Control System

Version Control (aka Revision Control aka Source Control) Systems are special types of software that track all changes to a file/code over time. Thus, providing an opportunity to go back in time to revert to an earlier version or compare an earlier version with the existing version. For generations source code is considered as the most precious article which needs to be kept to be protected (kept inside a vault). Hence source code is considered as a most important repository for developers.

Problem Statement: On a large project/software where multiple team members (especially Developers) are working in unison to build a new feature or fix an existing bug, a developer adds new code or changes a piece of code. Consider each developer performs multiple changes in the same file. Hence source code keeps on changing. How will we ensure all changes to a file are synced and tracked between all contributors?

Resolution: Version Control systems provide a solution to the above-stated problem by keeping a track of all the changes by an individual to the code repository. It provides a history of all the modifications performed on source code by all the individuals and helps to compare the latest version with the previous version and go back in time.

Types of Version Control Systems:

  1. Local Version Control Systems 

It is one of the easiest forms and has a database that tracks all the changes to files under revision control. RCS was the most popular Local VCS tool. It keeps a track of changes on the local disk. It allows user to create their version of codes/documents and later merge them. The main disadvantage is the only single user can work at a time.

2. Centralized Version Control Systems

Centralized VCS overcomes the challenges introduced by Local VCS allowing multiple developers to contribute at a time. As the name suggests there is a centralized server and all other systems (developers) connect to this centralized server and check-in/out their code simultaneously (an advantage over local VCS). The main disadvantage is the single point of failure i.e. if the Central server goes down or the Hard disk is corrupted and backup is not consistent then there is a risk of losing all the data, moreover, the versioning is stopped and no one would be able to check-in/out their code. Its examples include SVN, Team Foundation Version Control (TFVC), etc.

3. Distributed Version Control Systems

Distributed VCS is the de-facto standard for version control systems. As the name suggests distributed, there is no single central server where all source code resides, therefore, providing redundancy every user pull all the source code to their local systems make changes and commit it, However, commit won’t reflect other users because changes are made locally, hence changes needs to be push back to the central repository so other users can view the changes. Its examples include Git, GitHub, Bitbucket, etc.

One thought on “Version Control System”

Leave a Reply