下载git
wget https://github.com/git/git/archive/v2.23.0.zip


安装依赖
yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel curl-devel perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker


解压git
unzip v2.23.0.zip

开始安装
将git安装到/usr/local/git上
#先进入git-2.23.0文件夹, 编译,安装
cd git-2.23.0
make prefix=/usr/local all
make prefix=/usr/local install




验证安装
git --version

网友评论