yum 在 Centos 上安装旧版本的 git

All*_* Xu 0 git 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
Run Code Online (Sandbox Code Playgroud)

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

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

Rah*_*eed 5

您必须首先安装 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

  • 虽然较新的“git”不太可能造成任何麻烦,但 CentOS 中的东西较旧是有原因的 - 稳定性。一切都是和谐构建的,确保相互依赖的包一起工作时不会出现任何问题。 (2认同)