yum 在 Centos 上安装旧版本的 git

yum installs an older version of git on Centos

当我在 windows 或 Ubuntu 上安装 git 时,我得到的 git 的最新版本接近此处列出的版本:

https://github.com/git/git/releases

但是,当我在 centos Linux 上安装 git 时,我得到的是旧版本的 git:

yum check-update

yum install -y git

git --version

git version 1.8.3.1

版本 1.8.3.1 太旧了。我想我在这里遗漏了一些东西。

为什么我在 centos 上得到这么旧的 git 版本?

您必须先安装 wandisco 存储库,然后更新 git。

在URL中使用你的centos版本。

yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm

yum update git