- prepare build tools if tools not ready
1
yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
- remove old version git
1
yum remove git
- download latest version git from https://mirrors.edge.kernel.org/pub/software/scm/git/
1
2
3wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.9.5.tar.gz
tar zxvf git-2.9.5.tar.gz
cd git-2.9.5 - complie and install
1
2
3./configure --prefix=/usr/local/git
make
make install - set env path
1
2echo 'export PATH=$PATH:/usr/local/git/bin' >> /etc/bashrc
source /etc/bashrc - it’s done, check git version
1
git --version
Reference from