Version Control System | Git Series 1

What is version control?

We are working on a project. We write code. We implement features. We fix bugs. We document our changes.

We make mistakes!

We do not work alone! We collaborate with other developers.

We assign work to other developers.

We need to track changes as to how many developers made changes to single file to fix responsiblity and accountability.

Any software project has many deliverables like source code, build scripts, databases queries ,documents etc.

We need a tool/system which will save our deliverables, maintain history of changes and allow different developers to work with each other seamlessly.

“Version control is a system which allows tracks and manages changes to code, provide history of code changes and helps developers to work with each other without any conflicts over time.”

This allows developers to easily track code changes to fix bugs, to go back to previous versions or rollback changes.

It also allows to merge multiple changes on the same file which is performed by different developers by resolving merge conflicts.

Features of version control

  1. Centralised repository for code: It provides centralised repository for storing all deliverables in a single location.
  2. Tracking of code : It tracks all the changes made to the code over time by providing complete history of each file and revision.
  3. Branching: It allows each developer to create branch from the main branch so that they can implement specific features required without effecting main branch. Once completed feature branch can be merged to new branch.
  4. Collaboration : It allows multiple developers to work on same codebase independently and review each others work.
  5. Rollback : Version control system allows developers to rollback changes if bug is introduced or if changes do not work as expected.
  6. Access Control: Only authorised users can access codebase to view or make changes.

Examples of version control

Below is list of version control systems

  1. Git
  2. Subversion (SVN)
  3. Mercurial
  4. Perforce
  5. TFS (Team Foundation Server)

Out of above, Git is most popular version control system which is widely used by developers and organisations across the world.

Just to summarise version control system provides centralized repository for code so that developers can work efficiently by collaborating with each other and by storing complete history of changes made over time.