Git and Version control system introduction

Introduction to the git version control tool and basic operations in the git tool.

 425 total views


Git is an open-source version control system used by millions of users over the world. A version control system is used to track every change we do to a project. This system keeps track of every file changes done accordingly to the time. These changes can be rollbacked whenever needed from the repositories. Linus Torvalds, the person who developed the Linux kernel is also the reason to build this Git version control system.

There are three types of version control system

1. Local VCS – In the local version control system, version control is done within the local computer we use. It only saves the changes in the files over time as a version within the local computer. It saves the changes in the localhost.

2. Centralized version control system – Has the name specifies, there is a centralized hub that is used to store the files including the file changes. The central hub stores the file details and the snapshots over time. We can revert the files when needed from the central repository.

3. Distributed version control system – As in the form of distributed computers, we can have a distributed version control system in which the version control system is set on every computer connected over the network. The file changes are distributed over the servers and they can be retrieved at any time.

These repositories can be a local machine or server machine. An opensource distributed Git platform is called GitHub. By this, we can store and control our opensource projects in a distributed manner. This is also helpful in contributing millions of developers over the world for opensource projects successful. The other platforms are called Bitbucket, SourceForge, etc. Among them, Git is popular due to the following features:

  1. Open-source project.
  2. It tracks files like the snapshots in virtual machines.
  3. It gives security by means of checksum all the files using the SHA1 algorithm.
  4. It uses easy strategies to store the files in three stages as stages modified, staged, committed.
Working of git

Git installation

Install git on Linux OS

All linux system comes with all the Linux kernel
To install git on Linux distros

Debian system – using apt

sudo apt-get update
sudo apt-get install git

Fedora system – using yum

sudo yum install git

Install git on Windows OS

Like Linux, windows don’t come with git
To install git on windows system

  1. Download the git installer from here.
  2. Select the installer and then give next and setup git first.
  3. Next, we need to configure it by using Command prompt.
  4. Run the following commands in the cmd and give your user_name and email_id

git config --global "user_name"
git config --global "email_id"

Install git on Mac OS

To install git on Mac OS we use brew package manager

Using the brew package manager

brew install git
After successful installation of git check it by checking version using below command
git --version
It will return the following output according to the version number
git version 2.9.2
To get help type
git --help

 426 total views,  1 views today

Leave a Reply

Your email address will not be published. Required fields are marked *