使用yum 进行git 安装,安装的版本为1.18,版本较老,那么如何进行升级呢?
yum install -y git
现在将解决方案贴出,供后人使用;
1 配置存储库
启用Wandisco GIT存储库,在此之前我们先写入新yum存储库配置文件,在终端输入:
vim /etc/yum.repos.d/wandisco-git.repo
按i 进入插入模式,输入
[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
按:wq 保存退出,
2 导入存储库GPG密钥
终端输入:
rpm --import http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
3 安装git
终端输入:
yum -y install git
4 验证版本
终端输入:
git --version