当我在 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?
您必须首先安装 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