1. 下载Git
wget https://github.com/git/git/archive/v2.8.0.tar.gz
2. 安装依赖
sudo yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel curl-devel perl-ExtUtils-CBuilder perl-Extutils-MakeMaker
3. 解压缩
tar -zxvf v2.8.0.tar.gz
cd git-v2.8.0
4. 编译
sudo make prefix=/usr/local all
5.执行安装命令
sudo make prefix=/usr/local install
6. 检查Git版本
git --version
原文:https://www.cnblogs.com/linlf03/p/9190837.html