In this post, we will discuss some important concepts which showcase some of the advantages of distributed version control systems.
A picture is worth thousand words. If you want to know the difference between a centralized and distributed version control system, have a look at the image below.
If we take a look at all the version control systems, there are many topologies. They are discussed below.
Centralized topology has an architecture of developers pushing the changes to on central repository.
In this model all the developers push changes to sub-system repositories. One of such example is Linux kernel development. In this graphics, sounds etc are treated at sub-systems.
Once the development is over for a version, all the sub-system repositories will be periodically merged into single main repository.
In this type, each developer will push the code changes to their own repository. There will be project maintainers, who will pull the changes made my the developers top the main official repository.
One such example is the open source projects on Github. If you like to contribute to a project, you can fork the project, work on it and give a pull request to the original code base. The project maintainer will review your code and if he thinks it adds value, he will merge it to the official repository.
Also Look: Git Fundamentals Course
When you clone a repository, you copy the whole code and it becomes a backup.
In DVCS branching is really easy when compared to Centralized approaches. You can different branching strategies. For example, you can have a feature branch to work on a new feature and you can merge it easily with the main branch without much pain.
DVCS maintain a full local history which helps in finding out new bugs and tracking and rollback are made very easy.
I want to setup ssh authentication keys for my GitHub and Bitbucket account. So that I can commit to those repositories…