Version Control Tool Git

  • By
  • November 8, 2019
  • DevOps
Version Control Tool Git

In this you will learn:

  1. What is Git?
  2. How to install Git in Windows
  3. How to install Git on CentOS
  4. Configuring Git with your username and email
  5. Creation of remote repositories on GitHub with Git Authorization

 

What Is Git?

Install Git On Windows

Step 1: Create a GitHub account and then download it

Step 2: Run setup file and Select Destination location

Step 2: Select Destination location

Step 3: Select Components

Step 4: Select the Start menu folder

Step 5: Choosing editor which is used by Git

Step 6:  Adjustment of your path environment

Step 7: Choosing HTTPS transport backend

Step 8: Configuring the line editing conversations

Step 9: Configuring user terminal for Git Bash

Step 10: Configure extra options

The first is the option to ‘Enable file system caching’.

The second option is for ‘enabling Git Credential Manager’.

The third option is to Enable symbolic links.

Step 11: Configuring experimental option

Step 12: Installing

Step 13: Ready to use

Install Git on CentOS

Prerequisites

Step 1: Install the latest version with the command:

Step 2: Verify the installation using the command:

Configuring Git with your username and email

git config – – global user.name “<your name>”

git config – – global user.email “<your email>”

git config – – list

Creation of repositories on GitHub

Step 1: Login with GitHub Account

Step 2: Create an ssh key and add it to GitHub.

Step 3: ssh verification

Creation of remote repositories on GitHub with Git Authorization

Step 1: Login with Git

Step 2: Start your Project

Step 4: Create a repository as a project name.

For Free Demo classes Call: 7798058777
Registration Link: Click Here!

1.  What Is Git?

Git is a distributed version control tool – a critical software configuration management tool. With the benefit of a version control system (VCS), you can track, annotate, and organize changes to documents, websites, computer programs, and many other kinds of collected information.

For software developers, a VCS allows source-level software management. It allows developers to track changes, revert to earlier versions, or divert from the base code and build new file versions and new directories.

Git is today’s most frequently installed VCS worldwide.

2.  Install Git On Windows

Step 1: Create a GitHub account and then download it

Git is a distributed version control tool. We have a remote cloud-based repository i.e. GitHub and local repositories i.e. we are creating using our local Git tool. We just need to sign up with GitHub and then we are able to create your own unlimited public git repositories and 3 private repositories with free Git trial version.

Click here account creation

 

For downloading the latest version of Git, click on the link below:

Download Git for Windows

Great! Your file is being downloaded.

Step 2: Run setup file and Select Destination location

After your download is complete, run the .exe file in your system as an Administrator user.

Select Destination Location

Step 2: Select Destination location

Select Destination Location

Step 3: Select Components

After you have pressed the Run button and agreed to the license, you will find a window prompt to select components to be installed.

Step3

After you have made a selection of your desired components, click on Next>.

 

Step 4: Select the Start menu folder

Step 4

Step 5: Choosing editor which is used by Git

we can choose any editor but I am choosing Vim editor. In today’s days, Vim editor is one of the more popular text editors. It is an advanced version of the Vi editor and is written by Bram Moolenaar. It is a cross-platform editor and available on most popular platforms like Windows, Linux, Mac and other UNIX variants.

Step5

Step 6:  Adjustment of your path environment

The next window will let you choose the adjustment of your path environment. This is where you decide how you want to use Git.

Step 6

You can select any one option according to your environment needs. But for beginners, I will recommend you to use ‘Use Git From Git Bash Only’ option.

For Free Demo classes Call: 7798058777
Registration Link: Click Here!

Step 7: Choosing HTTPS transport backend

For communication with local developer computers to GitHub, we need to use the HTTP protocol. This connection is possible through HTTP using two different modes. The first mode is Git 1.6.6, there was only one way it could do this which was very simple and generally read-only.

 

But this version is not reliable for security point of view, Because of that In version 1.6.6, a new, smarter protocol was introduced that involved Git being able to intelligently negotiate data transfer in a manner similar to SSH protocol working.

 

In the last few years, this newer HTTP protocol has become very popular since it’s simpler for the user and smarter about how it communicates because of its security feature. The newer version is called a Smart HTTP protocol and the older way as Dumb HTTP.

Step 7

So we can select any one of the protocols for local to remote communication. For more security reson I am selecting an open SSL library i.e. Smart HTTP protocol.

Step 8: Configuring the line editing conversations

Step 8

This configuration for line editing. I am choosing the default one.

Step 9: Configuring user terminal for Git Bash

You can choose anyone from the options.

Step 9

The default terminal of MYSYS2 is a collection of GNU utilities like bash, make, gawk and grep to allow the building of applications and programs which depend on traditionally UNIX tools to be present.

Or you can choose the window’s default console window as well.

Step 10: Configure extra options

The next step is to choose extra features for your Git. You get three options and you can choose any of them, all of them or none of them as per your needs. Let me tell you what these features are:

Step 10

The first is the option to ‘Enable file system caching’.

Caching is enabled through the Cache Manager, which operates continuously while Windows is running. File data in the system file cache is written to the disk at specific intervals determined by the operating system, and the memory previously used by that file data is freed.

The second option is for ‘enabling Git Credential Manager’.

The Git Credential Manager for Windows (GCM) acts as a credential helper for Git. It securely stores your credentials in the Windows Credential Manager so that you only need to enter them once for each remote repository you access. All future Git commands will reuse the stored existing credentials.

The third option is to Enable symbolic links.

Symbolic links or symlinks are nothing but advanced shortcuts. You can create symbolic links for each individual file or folder, and these will appear like they are stored in the folder with a symbolic link.

I have selected the first two features only.

Step 11: Configuring experimental option

Some additional extra experimental options are also available. We can also enable these options. For this setup, I am not enabling any experimental option.

Step 11

Step 12: Installing

After clicking on the Install option, It will start the installation process.

Step 11

Step 13: Ready to use

Now you have all you need. Select Launch Git Bash and click on Finish

Step 13

This will launch Git Bash on your screen which looks like the snapshot below

For Free Demo classes Call: 7798058777
Registration Link: Click Here!

1.  Install Git on CentOS

Prerequisites

 

A Linux-based system with a CentOS 7 installed

A root user account privileges

Default package installer i.e. yum

CentOS development tools and default repositories

 

The easiest, fastest way to install Git is with Yum (Yellowdog Updater, Modified), CentOS’s package manager.

 

Follow these steps to install the latest version of Git on your Linux server.

Step 1: Install the latest version with the command:

yum install git

Now you’ve got Git and you’re ready to go!

Step 2: Verify the installation using the command:

git –version

A. Configuring Git with your username and email

Let us proceed with configuring Git with your username and email. In order to do that, type the following commands in your Git Bash:

git config – – global user.name “<your name>”

git config – – global user.email “<your email>”

User

It is really important to configure your local Git with GitHub because any commits that you make are associated with your configuration details.

If you want to view all your configuration details, use the command below:

git config – – list

List

This is how you install and setup GIT on Windows.

4. Creation of repositories on GitHub

Step 1: Login with GitHub Account

Accoun

Step 2: Create an ssh key and add it to GitHub.

Ssh Key

Ssh Key 2

Ssh Key 3

Ssh Key 4

Step 3: ssh verification

Now use the below command to test the SSH key:

ssh -T git@github.com

Ssh Verification

Creation of remote repositories on GitHub with Git Authorization

Step 1: Login with Git

 

Go to “www.github.com” and like a piece of cake, all you need to do to Sign Up is fill up the following form and click on Sign Up.

 

Step 2: Start your Project

Git

Step 4: Create a repository as a project name

Create

For Free Demo classes Call: 7798058777
Registration Link: Click Here!

Firetsrop

 

 

Author:
Onkar Kubade |SevenMentor Pvt Ltd

Call the Trainer and Book your free demo Class for now!!!

call icon

© Copyright 2019 | Sevenmentor Pvt Ltd.

 

One thought on “Version Control Tool Git

  1. Good Blog, well descrided, Thanks for sharing this information.

Submit Comment

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

*
*