TECHIES WORLD

For Techs.... Techniques.... Technologies....

Linux

How to install latest version of git in CentOS

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.

Since the CentOS repositories may not be updated and maintained with the newest versions of git, we need to compile the software from source.

Step1: Install dependencies

#yum groupinstall "Development Tools"
#yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel

Step2: Download source code of git

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

Step3: Extract the downloaded archive

#tar -zxf git.tar.gz

Step4: Change the location

#cd git-*

Step5: Compile and install

#make configure
#./configure --prefix=/usr/local
#make install

 

That's all....

We can check the version using the following command.

#git --version

 

Leave a Reply