以下是当前版本。
git --version
git version 2.1.0
如何在 CentOS 中更新到最新的 git 版本 2.2.x。 yum install git 表示它是 Linux AMI 实例上的最新版本。
最佳答案
你有一个新的 git 版本,这令人惊讶。这不是针对 CentOS 6 或 7 的正式打包。
CentOS 6 附带 git 1.7.1。
CentOS 7 附带 1.8.3.1。
要获取更新版本的 git,您需要找出从哪里获取已经"new"版本的 git,并查看它们是否有更新。亚马逊可能自己打包了一个新版本,但可能尚未更新该包。
来自 yum info git
的输出(来自评论):
$ yum info git
Loaded plugins: priorities, update-motd, upgrade-helper
Installed Packages
Name : git
Arch : x86_64
Version : 2.1.0
Release : 1.35.amzn1
Size : 22 M
Repo : installed
From repo : amzn-main
Summary : Fast Version Control System
URL : git-scm.com
License : GPLv2
Description : Git is a fast, scalable, distributed revision control system with an
: unusually rich command set that provides both high-level operations
: and full access to internals.
看来亚马逊已经自己打包了 git
版本 2.1,如果 yum update
没有为您提供更新的版本,那么他们还没有打包任何更新的版本.
release notes Amazon Linux AMI
页面似乎同意这一点。
关于git - 在 CentOS 中更新到最新的 git 版本 2.2.x,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28365026/