引言
Centos 7 服务器上默认安装的 Git 是 1.8.3.1 版本的,用 VSCode 远程连接服务器时,一直提示我更新到 2.x 版本。
卸载
首先,把老版本的 Git 卸掉。
sudo yum -y remove git
sudo yum -y remove git-*
 
安装
- 添加 End Point 到 CentOS 7 仓库
 
sudo yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
 
- 安装 Git
 
sudo yum -y install git
 
- 查看安装后的 Git 版本、
 
$ git version
git version 2.36.0
 










