What is Version Control:Centralized Vs Distributed
Before getting started and see the differences between Centralized vs Distributed version control, First we have to understand what is version control, so lets get started…
The name itself suggests what it is, Version control is a software or a tool that saves/records the changes of a file or a set of files over a period of time so that we can keep tracks of different versions of a project and we can recall specific versions later.Some of the most popular version control systems are Git,Subversion and Mercurial.
Version control system are divided into two categories i.e
There is a single central copy of your project present somewhere(probably on a server) and every interaction must go through this server that means if anyone wanted to change something on this central copy they have to get the particular file from the server and after changing it they can update those changes by pushing those files back to the server.Some of the most common centralized version control system are CVS,Subversion(or SVN) and Perforce.
The main advantages of centralized version control system is, it gives more control to the administrator that who can do what.programmers don’t have to keep many copies of a files in their drives manually because the version control tool can talk to central copy and get any files they want.
However there are some disadvantages also like if there is server down for a time period or there is any network connectivity issue then programmers wont be able collaborate and save the changes that they have been working on.There is even bigger risk that if somehow the hard-disk that is on the central copy gets corrupted then everything will be lost.
These type of version control system don’t rely on the central server to store all the versions of a project’s file instead every computer has the clone of the repository and has all the history of a project in their own hard drive,this copy or clone has all the metadata of original.some of the popular DVCS(distributed version control system) are Git,Mercurial and Bazaar.
Because of every computer has all the files of the project in their local repository that’s why if the server also dies there is no problem and we can copied the whole project back to the server.One more major benefit of this is that even if there is connectivity issue arises we can still work on our project and update those changes back to the sever when internet is available.
Although there are many advantages of Distributed version control systems(DVCS),there are certain disadvantages as well like,
like if the project has many binary files that can not be easily compressed,the space needed to store all the files will be pile up quickly.And if the project having a very large history(60000 changesets or more) downoading the entire history will take a lot of time and disk space.
popularity of types of version control system across the world.
From the picture above us we can clearly see that DVCS is more popular than the CVCS and has been chosen the preferred one.But its purely depend what are things we want from our version control tool and we can choose accordingly .