采用版本是2.30.0

下载文件:

wget https://www.kernel.org/pub/software/scm/git/git-2.30.0.tar.gz

 

解压文件:

tar -zvxf git-2.30.0.tar.gz

 

进入文件夹

cd git-2.30.0

 

编译文件

make prefix=/usr/local/git all

 

编译报错:

http.h:6:10: fatal error: curl/curl.h: No such file or directory
#include <curl/curl.h>

yum -y install curl-devel

 

http-push.c:22:10: fatal error: expat.h: No such file or directory
#include <expat.h>

yum install expat-devel

https://blog.csdn.net/weixin_41910427/article/details/82733265

P.s.  我是采用rpm包下载的方案:

https://centos.pkgs.org/7/centos-x86_64/expat-devel-2.1.0-12.el7.x86_64.rpm.html

 

生成执行程序:

sudo make prefix=/usr/local/git install

 

修改 /etc/profile 配置

 


 

Git常用命令记录:

更新远端分支列表:

 

本地分支去掉远端分支绑定

 

回退版本:

 

添加远端分支

 

开发合并基本操作:

 

 

【Git】升级最新版本 && git 常用命令记录
Tagged on:
4.5 2 votes
Article Rating
订阅
提醒
0 评论
Inline Feedbacks
View all comments