参考博客:https://blog.csdn.net/yuexiahunone/article/details/78647565由于新的版本可以使用gitea功能所以升级git版本,centos7默认git版本如下:
[root@git ~]# git --version
git version 1.8.3.1
yum命令安装git是最简单的,直接键入命令安装就可以了
yum install git -yy
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
wget https://github.com/git/git/archive/v2.9.5.zip
unzip v2.9.5.zip
cd git-2.9.5
make prefix=/usr/local/git all
make prefix=/usr/local/git install
rm -rf /usr/bin/git
ln -s /usr/local/git/bin/git /usr/bin/git
git --version
[root@git git-2.9.5]# git --version
git version 2.9.5
原文:https://www.cnblogs.com/ericchengge677/p/10635510.html