git版本更新

论坛 期权论坛 脚本     
匿名技术用户   2020-12-28 03:21   20   0

1)卸载系统自带的低版本git(1.7.1)

#git --version

git version 1.7.1

# yum remove git

2)编译安装最新的git版本

# cd /usr/local/src/

更新地址https://www.kernel.org/pub/software/scm/git查询最新版本

# wget https://www.kernel.org/pub/software/scm/git/git-2.22.0.tar.xz

# tar -vxf git-2.22.0.tar.xz

# cd git-2.22.0

# make prefix=/usr/local/git all

# make prefix=/usr/local/git install

# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/profile

# source /etc/profile

更新成功

# git --version

git version 2.22.0

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP