Linux combat - upgrade Git version

Article directory

Today, I am tinkering with the web version of VSCode, and I always prompt that the git version is too low. After looking at the 1.8.3 version, after experiments, the following methods can perfectly achieve the goal

  1. The highest version of git that comes with CentOS7 is 1.8.3.1 and cannot be updated through yum
  2. Make sure you are logged in with the root user
  3. Configure the repository, add source content, and save
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. Import the repository GPG key
rpm --import http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
  1. install git
yum install git
  1. view version
[root@tianxin ~]# git version
git version 2.31.1

Guess you like

Origin blog.csdn.net/sinat_34104446/article/details/119914342