nordvpn

How to install git 2.7.0 on Centos/RHEL 7/6

How to install git on Centos /RHEL

In this tutorial i will show you how to install git on centos and rhel. So, let’s get started.

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.

Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.

install git on centos

Prerequisites

Install the required package for git. Git required following packages using following command.
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install gcc perl-ExtUtils-MakeMaker

Read Also: How to install piwik analytics tool?

Download and Install git

Now we will download and install git using following command or got to https://www.kernel.org/pub/software/scm/git and download the latest version of git.
wget https://www.kernel.org/pub/software/scm/git/git-2.7.0.tar.gz
tar zxvf git-2.7.0.tar.gz

Now use the following command to compile source code..
cd git-2.7.0
make prefix=/usr/local/git all
make prefix=/usr/local/git install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc

Read Also: Replicate postgres from one RDS instance to another

You have successfully installed git. Now you can check the version of the git using following command

git --version

This command will show git version 2.7.0.

If you have any issue using this tutorial feel free to comment below.

Read Also:
10 useful macbook shortcuts
How to install git on Ubuntu

Leave a Reply

Your email address will not be published.


*



The reCAPTCHA verification period has expired. Please reload the page.

48-Hour Flash Sale! Courses from just $10.99