一、安装依赖yum update -y #可以不做yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMakerwget https://github.com/git/git/archive/v2.7.4.zipunzip v2.7.4.zipcd git-2.7.4make prefix=/usr/local/git allmake prefix=/usr/local/git installrm -rf /usr/bin/gitln -s /usr/local/git/bin/git /usr/bin/gitgit --version[root@192 git-2.7.4]# git --version git version 2.7.4[root@192 git-2.7.4]# which git /usr/bin/git[root@192 git-2.7.4]# git所要的文件在自己百度云的tmp目录下