1.使用yum安装
yum -y install git
yum remove git
2.源代码安装
a.下载git源码 网址为 https://github.com/git/git/releases
b. 解压 tar -zxf git-manpages-2.9.3.tar.gz
c. cd git-manpages-2.9.3.tar.gz
d.编译安装到指定目录
$ make prefix=/usr/appall
$ sudo make prefix=/usr/app install