###安装依赖

yum install -y curl curl-config curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakelMaker

###git安装

wget https://github.com/git/git/archive/refs/heads/master.zip 或者
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.31.0.tar.gz 

###解压git的压缩包,然后进去

cd git-master
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
Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐