Linux实战-升级Git版本

文章目录

今天在捣鼓网页版的VSCode,老是提示git版本过低,一看1.8.3版本,经过实验,以下方法可以完美达到目的

  1. CentOS7自带的git最高版本1.8.3.1且不能通过yum更新
  2. 确保使用root用户登录
  3. 配置存储库,添加源内容,然后保存
vim /etc/yum.repos.d/wandisco-git.repo
[wandisco-git]
name=Wandisco GIT Repository
baseurl=http://opensource.wandisco.com/centos/7/git/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
  1. 导入存储库GPG密钥
rpm --import http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
  1. 安装git
yum install git
  1. 查看版本
[root@tianxin ~]# git version
git version 2.31.1

猜你喜欢

转载自blog.csdn.net/sinat_34104446/article/details/119914342