1.安装以来包
# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker

2.卸载旧版本git
# yum remove git

3.下载最新版的git源码进行安装, 可以先到kernel网址看看有什么版本
# wget https://www.kernel.org/pub/software/scm/git/git-2.17.0.tar.gz
# tar xzf git-2.17.0.tar.gz
# cd git-2.17.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
# git --version
09-23 06:02