Git vs GitHub

Git is a distributed version control system. In this article, we will try to understand what is version control system (VCS) is, what is distributed version control system (DVCS) is, and what is centralized version control system(CVCS) is and git commands.
 
Before explaining everything, first start with some practice.
 
Go to the command prompt and type git --version,
 
GIT and GitHub
 
If you see the above error, it indicates that your machine doesn'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 we have installed and suggest the download option. So click on download and install it.
 
GIT and GitHub
 
While installing GIT, you can choose the default editor; here, you can select Code VS or Notepad or Notepad++ as you are unaware of the VIM default editor.
 
GIT and GitHub
 
Once installation completes, execute the command again from the command prompt git --version. You will get the performance of the git installed.
 
GIT and GitHub
 
Now create one folder on your drive and name it any like GitApril2021.
 
Open the 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 primarily 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 git bash,
 
<<git config --global user.name rahul>>
<<git config --global user.email "[email protected]">>
 
So after this, whenever the user commits changes, it will provide information about who has saved the changes.
 
GIT and GitHub
 
You can check if it is configured or not by executing the command,
 
<<git config user.name>>
 
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 configurations, 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 the Version control system.
 
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 do we need it? 

 
While developing an application, multiple developers make multiple changes simultaneously, creating multiple versions. The version control tool is essential to know what difference a user makes in a specific 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 application versions and determine which version a particular user has made and what changes. 
 
GIT and GitHub
 

Why do 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 allows 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, developers can't do anything if the server gets down because they get code from the central server. So 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 copy. There is a chance of code conflict in DVCS, but there is the option to resolve the dispute. 
 
CVS 
 
The first VCS in 1990 was CVS (Concurrent Version Control System). Its last stable release was in 2008.
 
Apache Subversion 
 
It is commonly known as svn, created by Collabanet in 2000 and is now an Apache project.
 
Latest Version - Feb 2021. Companies using - Accenture, LinkedIn, etc.
 
Mercurial 
 
Created in 2005, written in Python, Stable release March 2021
 
Perforce
 
Companies using TCS, Google, etc., and many VCS are there as BitKeeper, Rational Clearcase, Darcs, Monotone, and 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 unpleasant person in British language slang.
  • Distributed Version Control System.
  • They are written in the Perl, C, and shell scripts collection.
  • Google, Quora, Facebook, Netflix, Reddit, Lyft, etc., use it.
  • Latest Version: 2.31
  • Official Website: https://git-scm.com/ 
Site Definition Git is a free and open-source distributed version control system designed to handle everything from small to massive projects quickly and efficiently.
 
Note
In the following article, I will start on command.


Similar Articles