Download and Install Git on your OS
Git Bash Editor support some Linux command as well


Version control, also referred to as source control, is a method of monitoring and managing software modifications. Every modification to the code is recorded in a unique database by version control software. Every developer's modification is monitored by version control, which serves to prevent concurrent work from conflicting. Okay, the definition is quite simple; however, it is important to comprehend the necessity of the version. control in the first place. 

 

 

What is the precise function of this version control tool? 

  • It provides a centralized location. 
  • It supervises your source code. It supervises and monitors the individuals who are responsible for what modifications. 
  • It maintains a specific type of database that records each modification. 
  • It controls every developer.
  • Change helps them prevent with any concurrent work, like If two developers working on the same module, it will give you a red flag.

 


Centralized Version Control

 

  • There is a server acts as a main central repository. This central server will keep everything. 
  • We can name this server a centralised source control server. 
  • Everyone commits to the main branch. 
  • For Whom: Small teams 

 

How works?

  • The developer will first clone the central repository and have a functional copy, at local system Once they have their working copy, they can update or commit changes. Update the central  repository database by committing changes. 
  • To make modifications, they must connect to the central server. This developer's changes will be visible to others who update their local copy from centralized repository copy. 
  • Whatever adjustments the developer must make for each process, Developers must access centralised servers. We call it centralised version control because of it.

Example: SVN, TFVC team foundation etc..

 

Pros

  • Work well with binaries/large files
  • Complete Visibility
    • You will have a complete visibility in your source code.
  • Easy to user and setup
    • distributed version control will have some sort of learning curve wherein the centralized version control is very easy to set up and very easy to start

 

Cons

  • Single point of failure
    • As mentioned, it has one central server and regular cloning and updating. If this central server goes down, all developers will be idle.
  • Slow/Delay Development
    • You need to connect to the centralized server for each operation.
    • in centralized version control you have physical branches. Unlike  distributed, where the branches are virtual. Even that makes the centralized version control quite slow.
  • Not fit for large team

 


Distributed Version Control

There is a central server 
Every developer workstation has a working copy, akin to centralized version control. 

Distributed version control gives each developer a local repository. Developers can commit changes without connecting to the centralized version control.

The developer can modify locally. The developer can commit changes locally and only connect to the central server when they are ready to merge with the centralized repository.



The only time for which you will connect to the central server to update your modification to the central is at that time. Other individuals has to retrieve the modifications, update their local repository, In the same time, they will also revise their local working copy.

 

Features

  • multiple repositories. There are multiple repositories which gets created when you're working with distributed version control.
  • Each user has their own repository and working copy. 
  • User needs to pull to fetch the latest change, whereas developer needs to push their change to update the remote repository.

 

Example: Git.

 

Pros

  • Multiple source code backup
    • If there are 11 developers, each developer will have the source code backup on their local system with complete source code as well as history. 
    • History is basically tells you how was the change made, when was the change made? Who did the change? What was the change all about? 
  • Fast and Flexible merging
    • You are not currently accessing the internet while you are making your modifications and conducting your operations. You are making all of your modifications to your local repository on a local level. It is undoubtedly rapid.
    • Also, it does not generate any tangible branches. The branches are virtual. And it's just the head and the pointer which moves from up to down.
  • Instant feedback & fewer conflicts
  • Available offline
    • in case of any central version control failure. You still have your local repository. You can still work on each and every developers can work. And when the central repository comes up, you can simply push your changes to the central repository,

 

Cons

  • initial checkout is slower
    • if you are working on a bigger repository and when you do the initial clone (taking the centralized copy onto your local system).
    • So when you do a checkout for the first time it is slow because along with your source code, you are cloning the entire history of the repository.
    • So so initially it will be slower, but later when you do the pull it is comparatively very faster than others.
  • Additional storage is required by each user
    • This will necessitate additional storage due to the repository source code and repository storage and the history will be stored on your local system.
    • As you are currently maintaining a local repository. Therefore, it is possible that it will consume a portion of the storage space on your hard drive.

 


Related Question