DEV Community

Cover image for Version Control
Nisha Srivastava
Nisha Srivastava

Posted on

Version Control

In the previous post I mentioned the stages of DevOps and the first being Version Control

Version Control

It is basically all things managing the source code.

Version control is of 2 types.

  1. Centralized Version Control
  2. Distributed Version Control

1. Centralized Version Control

image

In centralized version control there is one main repository and multiple users commit and update in that repository.

All changes in the file are tracked in the centralized repo/server

In case you lose your central repo, your whole source code will be gone and this is one of the major drawbacks of centralized version control system.

examples of centralized version control

  • Tortoise SVN
  • Perforce
  • CVS

2. Distributed Version Control

image

To overcome the drawbacks of centralized Version Control ,distributed version control was introduced.
In this type of version control, a developer clones the main repository of the project and saves it to his/her local hard disk
(disk space is not a matter of concern here as disk space is so cheap that storing many copies of a file doesn’t create a noticeable dent in a hard drive’s free space.)
After cloning the central repo, user commits and updates in the local repo and then do the push pull events to central repo.
If the data on central server is lost, there stays a sense of relief because of repo of project being present in the machine of developers.

There are plenty of advantages of using distributed version control system over centralized one.

Examples of distributed Version Control

  • Git
  • Mercurial
  • Bazaar

We'll talk about the pros and cons of using both in the next post.

Let's connect on Linkedin

Stay Kind.

Top comments (0)