CentOS 多數版本自帶的 git 停留在 1.7,不少新功能用不到。不想編譯的話,可以走 RPM 安裝這條路。
對應版本的套件可以從這裡找:https://ius.io/GettingStarted/
# 51cto 的 BUG,URL 太長只能換行 yum -y install epel-release.noarch rpm -ivh https://centos6.iuscommunity.org/ius-release.rpm
安裝之前可以先看一下目前有哪些可用版本:
# yum list all |grep --color git yum -y install git2u-2.10.1-1.ius.el6.x86_64
就這麼簡單。
本文出自「波波」部落格,https://chyou.blog.51cto.com/5503396/1872978