一.安装yum源
centos6系统:
wget http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm && rpm -ivh wandisco-git-release-6-1.noarch.rpm
centos7系统:
wget http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-1.noarch.rpm && rpm -ivh wandisco-git-release-7-1.noarch.rpm
或者
wget http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm && rpm -ivh wandisco-git-release-7-2.noarch.rpm
二.安装git 2.x
yum install git -y
三.验证
git --version
git version 2.14.1
四.备注:
,可以看到git已经升级到2.14.1的版本了,其实centos6还可以升到2.16的版本,用以下的yum源就可以了:
wget https://centos6.iuscommunity.org/ius-release.rpm
rpm -ivh ius-release.rpm
yum install git -y
git --version
git version 2.16.2

本文详细介绍了在CentOS 6和7系统中如何通过安装特定的YUM源来升级Git到2.14.1及更高版本的过程。首先,根据不同版本的CentOS,提供了下载并安装Wandisco Git Release包的步骤。对于CentOS 6,额外提供了一种方法,可以将Git升级至2.16.2版本。
3701

被折叠的 条评论
为什么被折叠?



