Installing git from source

RHEL7/CentOS7 use a relatively old version of git. Here’s how to update (using git 2.19.1 as example)

GITVERSION=2.19.1
mkdir -p ~/src && cd ~/src
git clone https://github.com/git/git
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-$GITVERSION.tar.gz
tar xf git-$GITVERSION.tar.gz
cd git-$GITVERSION && ./configure && make && sudo make install
git --version

 

Leave a Comment