Git & Git Hub

 

GIT & GIT HUB 


Synopsis:

In this post, we are going to see a few installation processes, let us know more detail about how the installation works.





 



Install Git On Windows

Step 1:

    First, you have to download the latest version of GIT, check out the below link:

Download Git for Windows

https://git-scm.com/



or             https://git-scm.com/download/win/


Yes, Now download the proper file !!!

Step 2:

    Once after download Run the .exe file

Windows Run Git - Install Git - Edureka

Step 3:

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

Windows Select Components - Install Git - Edureka

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

Step 4:

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

Windows Adjusting Path Environment - Install Git - Edureka

You can select any of the three options according to your needs. But for beginners, I recommend using Use Git From Git Bash Only

Step 5:

The next step is to choose 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:

Windows Configuring Extra Features - Install Git - Edureka

The first is the option to Enable file system caching.

    •    Operates continuously while Windows is running. 
    •    File data in the system file cache is written to the disk at intervals determined by the operating system, and the memory previously used by that file data is freed.

The second option is to enable Git Credential Manager.

    • A credential helper for Git. 
    • It securely stores your credentials in the Windows CM so that you only need to enter them once for each remote repository you access. 
    • All future Git commands will reuse the existing credentials.

The third option is to Enable symbolic links.

    • 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 symbolic links.
    • I have selected the first two features only.

Step 6:

Choose your terminal.

Windows Configuring Terminal Emulator - Install Git - Edureka

You can choose one of the options.

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 (cmd.exe).

Step 7:

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

Windows Finishing Git Installation - Install Git - Edureka

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

Git Bash Terminal - Install Git - Edureka

Step 8:

Let us proceed with configuring Git with your username and email. 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>"

Git Windows Configuration - Install Git - Edureka

It is important to configure your Git 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:

Course Curriculum

Git and GitHub

  • Self-Paced Learning
  • Real-life Case Studies
  • Assignments
  • Lifetime Access
git config - - list

Windows Git Configuration List - Install Git - Edureka

This is how you install and set up GIT on Windows.

   

Install Git on CentOS

Step 1:
First, we need to install the software that Git depends on. These dependencies are all available in the default CentOS repository.

Use the command:

sudo yum groupinstall "Development Tools"

Centos Git Installation Step 1 - Install Git - Edureka

It will ask for your confirmation to download the tools.

Centos Git Installation Step 2 - Install Git - Edureka

Press Y for Yes.

The “Development tools” which is a yum group, is a predefined bundle of software that can be installed at once, instead of having to install each application separately. The Development tools will allow you to build and compile software from source code.

Now use the command:

sudo yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel

Centos Git Installation Step 3 - Install Git - Edureka

Enter your password. It will ask for your confirmation to download the package.

Centos Git Installation Step 4 - Install Git - Edureka

Press y.

Now we are ready with the prerequisites. Let's proceed towards Git installation.

Step 2:

Now we are going to use the wget command to download a specific version of Git.

Centos Git Installation Step 5 - Install Git - Edureka

 But first, we need to copy the link to the version that we want to install. For that go to this website.

You will find the following webpage:

Centos Git Installation Step 6 - Install Git - Edureka

I am downloading the git-2.7.2.tar.gz version of Git.

Now use the wget command with the link to the Git version you have chosen to install. Use the command below:

wget https://github.com/git/git/archive/v2.7.2.tar.gz -O git.tar.gz

Centos Git Installation Step 7 - Install Git - Edureka

This downloaded file will be available in my directory.

Step 3:

Once the download is complete we will extract the file from the downloaded Git Tar file. For that, we will use the Tar command.

tar -zxf git.tar.gz

Centos Git Installation Step 9 - Install Git - Edureka

Let's see the extracted folder.

Centos Git Installation Step 10 - Install Git - Edureka

There it is! :-)

Step 4:

Now let's change the directory to Git.

Use the command cd git

Centos Git Installation Step 11 - Install Git - Edureka

Step 5:

We are in the source folder we can begin the source build process. For that first type in the command:

make configure

Centos Git Installation Step 12 - Install Git - Edureka

Now use the following command:

./configure --prefix=/usr/local

Centos Git Installation Step 13 - Install Git - Edureka

The configure script is responsible for getting ready to build the software on your specific system. It makes sure all of the dependencies for the rest of the build and installs process are available once configure has done its job, we can invoke make to build the software.

Now that the software is built and ready to run, the files can be copied to their final destinations. Use the command below:

sudo make install

Centos Git Installation Step 14 - Install Git - Edureka

The make install command will copy the built program, and its libraries and documentation, to the correct locations.

Step 7:

Now to check the version of Git installed  we will use the command:

git --version

Centos Git Installation Step 15 - Install Git - Edureka

Step 8:

Before we go ahead you need to submit some information about yourself so that commit messages will be generated with the correct information attached.
We need to provide the Name and Email address that we would like to embed into our commits, to do that we will use the following commands:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

Centos Git Installation Step 16 - Install Git - Edureka

To confirm that these configurations are added successfully we will use the command:

  git config --list 

Centos Git Installation Step 17 - Install Git - Edureka

Step 9:

Now we need to generate an SSH key.
SSH is a secure protocol used as the primary means of connecting to Linux servers remotely. Now to generate a new SSH key we will use:

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Centos Git Installation Step 18 - Install Git - Edureka

It will ask you to enter the file name where you want to save the key. If you want it saved in your default directory press ‘Enter’. Enter a blank passphrase if you want to and then enter the same again.

There is a program called ssh-agent that runs the duration of a local login session. It stores unencrypted keys in memory and communicates with SSH clients using a Unix domain socket. So to ensure that the SSH agent is enabled we will use this command below:

eval "$(ssh-agent -s)"

Centos Git Installation Step 19 - Install Git - Edureka

To add an SSH key to the SSH agent we will use

ssh-add ~/.ssh/id_rsa

Centos Git Installation Step 20 - Install Git - Edureka

To add an SSH key to our GitHub account we will use:

cat ~/.ssh/id_rsa.pub

Centos Git Installation Step 21 - Install Git - Edureka

The gibberish you see on screen is actually the SSH key. ;-)

Finally, we need to copy the SSH key and then we need to go to the GitHub account and click on settings.


Centos Git Installation Step 22 - Install Git - Edureka

and then go to SSH and GPG keys option on the left.

Centos Git Installation Step 23 - Install Git - Edureka

 

We will now click on the New SSH key and add a title to it and then paste the copied key in the space provided. Now we will click on add SSH key

Centos Git Installation Step 24 - Install Git - Edureka

Now use the below command to test the SSH key:

ssh -T git@github.com

Centos Git Installation Step 29 - Install Git - Edureka

Now we can see in the snapshot below, that the color of the key is green. It means we have successfully tested the key.

Centos Git Installation Step 25 - Install Git - Edureka

This is how you install Git and connect to your central repository on Git.

Create GitHub Repositories

You have learned to install Git in your system and now it's time to make repositories on GitHub that will act as your remote repository.

Step 1:

Go to www.github.comand 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:

Choose if you want your repositories to be private or public.

GitHub First Step - Install Git - Edureka

After choosing your plan, click on Continue

Step 3:


Course Curriculum

Git and GitHub

Weekday / Weekend Batches


Confirm your email and then click on Start a project.

GitHub Start A Project - Install Git - Edureka

Step 4:

Name your repository and click on Create repository.



Your repository will look like this snapshot below:


Now, you are all ready to commit, pull, push and perform all other operations using Git. 













Comments

Popular posts from this blog

iDigiSoft Technologies - POSTER: Java & J2EE

iDigiSoft Technologies - POSTER: DIGITAL MARKETING

IDS Technology