GIT And GitHub

Git is a distributed version control system.
In this article, we will try to understand what is version control system (VCS), what is distributed version control system (DVCS), what is centralized version control system(CVCS) and git commands.
Before explaining everything first start with some practice.
go to command prompt and type git --version,
GIT and GitHub
If you see the above error then it indicates that in your machine you don't have git installed.
So here we will do the first thing is to install GIT.
Go to your browser and type GIT download -> click the link,
GIT and GitHub
After clicking the link it will be redirected to the official website of git and it will recognize the OS which we have installed and suggest the download option. Click on download and install it.
GIT and GitHub
While installing GIT you can choose the default editor, here you can choose VS Code or notepad or notepad++ as you are currently unaware of the VIM default editor.
GIT and GitHub
Once installation completes, execute the command again from command prompt git --version you will get the version of the git installed.
GIT and GitHub
Now create one folder on your drive and name it as any like GitApril2021.
Open folder and right-click you will see two new options,
GIT and GitHub
Click on Git Bash, it will be used for executing the git commands.
We mostly use git bash to do the changes on fire commands.
After this, the most important one-time command is the config command. You can use the different flag with config as,
  • global
  • system
  • local
Type command on gitbash,
<<git config --global rahul>>
<<git config --global "">>
So after this whenever the user commits changes, it will provide information that who has committed the changes.
GIT and GitHub
You can check if it is configured or not by executing the command,
<<git config>>
If you want any help with the command you can use the help command,
git help <<name of the command>> 
<<git help config>> 
To list all configuration we can use the below command,
<<git config --list>>

GIT and GitHub

Who wants to use the GIT?

Whoever wants to keep code safe remotely can use GIT. 
Now we will move to the theoretical part, we will understand what is the Version control system and all.
The version control system can be Centralized or Distributed. If you don't want to lose the hard work, you can use VCS (Version Control System).

Why we need it? 

While developing an application, multiple developers do multiple changes simultaneously, and hence multiple versions got created. The version control tool is essential to know what change is done by a particular user in a particular version. In today's world, large applications are being developed by organizations and to track the changes version control system is necessary.
With the VCS we can manage different versions of the application, as well as we can find out on which version a particular user has made what changes. 

GIT and GitHub

Why we use Version control Software?

  • To track every change
  • Maintain different versions for DEV, QA, Prod
  • Easy for collaboration
  • Helps to develop and shift product faster
  • It helps DevOps especially. 
In the diagram, you will get an idea about the VCS. VCS can be Distributed or Centralized.
GIT is an example of Distributed Version Control System (DVCS). 
GIT and GitHub
Here in CVCS, if the server gets down developer can't do anything, because they are getting code from the central server. It is a single point of failure.
In DVCS each user can have a copy of the repository(server code copy),
GIT and GitHub
Even though the server is down the developer can work on their own copy. There is the chance of code conflict in DVCS but there is the option to resolve conflict. 
The first VCS that came in 1990 is CVS (Concurrent Version Control System) its last stable release was in 2008.
Apache Subversion 
Commonly known as svn created by Collabanet in 2000, now an Apache project.
Latest Version - Feb 2021. Companies using - Accenture, LinkedIn, etc.
Created in 2005, written in Python, Stable release March 2021
Company using - TCS, Google, etc also, so many VCS are there as BitKeeper, Rational Clearcase, Darcs, Monotone, Azure TFVC(Team Foundation Version Control).
Now let's move again to GIT,
  • GIT was created by Linux Torvalds in 2005. 
  • Linux kept this name which means the unpleasant person in British language slang.
  • Distributed Version Control System.
  • Written in the collection of Perl, C, and shell scripts.
  • Google, Quora, Facebook, Netflix, Reddit, Lyft, etc. uses it.
  • Latest Version: 2.31
  • Official WebSite: 
Site Definition Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
In the next article, I will start on command.

Recommended Ebook

Printing in C# Made Easy

Download Now!
Similar Articles