删除低版本的yum安装的git
yum remove git
del success;
wget https://www.kernel.org/pub/software/scm/git/git-2.8.3.tar.gz
解压cd进去
./configure prefix=/usr/local/git/
make && make install
//如果这里出错:perl Makefile.PL;make;make install错误
需要安装:
yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
vi /etc/profile
export PATH=$PATH:/usr/local/git/bin
source /etc/profile
当git出现clone https的错误时候说明没有安装curl-devel
需要yum install curl-devel
然后到git目录就重新安装一遍