centos7 升级 git2
centos7 默认的git版本是1.8.x
git --version
git version 1.8.3.1
使用第三方仓库安装方式(IUS)
地址 https://ius.io/setup
yum install \
https://repo.ius.io/ius-release-el7.rpm \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
若出现 不更新已安装的软件包
提示,则需要卸载之前的源,再进行安装
yum remove epel-release.noarch
yum remove ius-release.noarch
搜索git
yum search git
···
git.x86_64 : Fast Version Control System
git222.x86_64 : Fast Version Control System
git224.x86_64 : Fast Version Control System
···
安装并验证
# yum remove git
# yum -y install git224
# git version
git version 2.24.4