Git linux 版本安装
1、安装依赖
yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install -y gcc perl-ExtUtils-MakeMaker
2、进入官网下载压缩包(我是centos)
https://mirrors.edge.kernel.org/pub/software/scm/git/
3、解压
tar -zxvf git-2.33.0.tar.gz
4、编译安装
#执行以下两个命令将Git进行编译安装到/usr/local/git目录下
cd git-2.33.0/
make all prefix=/usr/local/git
make install prefix=/usr/local/git
5、配置环境变量
vim /etc/profile
#添加以下内容
export PATH=/usr/local/git/bin:$PATH
#保存退出后刷新
source /etc/profile
最后git --version就能看到成功了额