1、先卸载自带git
# yum remove git
2、添加yum源
# vim /etc/yum.repos.d/wandisco-git.repo
[wandisco-git]
name=Wandisco GIT Repository
baseurl=http://opensource.wandisco.com/centos/7/git/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
3、导入存储库GPG密钥
rpm --import http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
4、安装git
# yum -y install git
5、验证
# git --version
网友评论