How to install latest version of Git on Centos 7

git logo

The git version that yum installs on Centos is quite old. I will go through installing the latest version of Git on Centos 7 from the source code.


  • OS: Centos 7.3
  • Git that comes with yum: 1.8
  • Current latest git: 2.12

Install Dependencies

sudo yum -y update sudo yum groupinstall "Development Tools"
sudo yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel

Download latest package

cd /opt/
sudo wget \
  -O git-2.12.2.tar.gz sudo tar -zxf v2.12.2.tar.gz
cd git-2.12.2/

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

1 Comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.