参考文档:https://www.cnblogs.com/ddif/p/13474288.html

1. 卸载自带Git

  1. $ sudo yum remove git

2. 安装repo

新增 /etc/yum.repos.d/wandisco-git.repo 文件,填充以下内容:

  1. [wandisco-git]
  2. name=Wandisco GIT Repository
  3. baseurl=http://opensource.wandisco.com/centos/7/git/$basearch/
  4. enabled=1
  5. gpgcheck=1
  6. gpgkey=http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco

3. 导入存储库GPG密钥

  1. $ rpm --import http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco

4. 安装最新版的git

  1. $ sudo yum install git