SAGARFIVE

1. Introduction

2. Git Basics

3.  Git Terminology

4.  Git Branching

5.  Git - Github

6.  Git Add (Git staging)

7.  Git Commit

8.  Github Advanced

9.  Git Remote

3.2 Version Control System

Image source : simplelearn
  • Version control/source control is the handle of tracking and managing changes to source code.
  • It supports creating different versions of file collection. Each version captures a snapshot of the files at a certain point of time(ex: Creating commit in git)
  • You can revert the collection of files using the snapshot. VCS allows you to switch between these versions.
  • These versions are stored in a specific place, typically called a repository.

Types of VCS –  Version control system :

(i)    Local version control system : it’s a user end specific – it’s a local database of tracking of changes to  files in the code. Copy of code stored in a particular developer, so relation to other developers.

image credits : gitscm

(ii)   Central version control system : it’s a central server where code is stored, everyone can connect and work with that code and make changes , so it helps to handle work by many developers.

Image credits : medium user
  • Centralised Version Control is a version control system using server/client model and server contains all the history(Commit history) of source code.
  • In CVS, a client needs to get a local copy of the source from the server, do the changes and commit those changes to the central source on the server.
  • Offline working not possible, have to connect with repository and you will get only the file what you want to edit, you do not get entire code
  • Developer must and should connect to the repository to commit/save the changes on the code/file.
  • If you are offline or server fails, then you won’t able to deal with Repository
  • CVS is slower as every command needs to communicate with the server.

(iii)  Distributed version control system : code stored at server with high availability and developers can copy that code to their local machine, when ever developers want ,they can send modified/developed code to server, and modified code can be updated to all developer local machines when they want to use the code.

Image credits : medium user

Advantages of Distributed Version Control System – DVCS :

  • Work offline
  • Good backup/saving of code changes as versions(commits)
  • Share the code among many developers
  • Very much helpful for open source contribution for open source application/tools