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:
- Open-source project.
- It tracks files like the snapshots in virtual machines.
- It gives security by means of checksum all the files using the SHA1 algorithm.
- It uses easy strategies to store the files in three stages as stages modified, staged, committed.
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
- Download the git installer from here.
- Select the installer and then give next and setup git first.
- Next, we need to configure it by using Command prompt.
- Run the following commands in the cmd and give your user_name and email_id
git config --global user.name "user_name"
git config --global user.email "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
It will return the following output according to the version number
git version 2.9.2
To get help type
383 total views, 1 views today