-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
114 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,9 @@ git config --global --get user.email | |
insteadOf = https://gitlab.xxx.com/ | ||
[url "[email protected]:"] | ||
insteadOf = http://gitlab.xxx.com | ||
// 或者执行 | ||
git config --global url."[email protected]:".insteadOf http://gitlab.xxx.com/ | ||
``` | ||
|
||
|
||
|
@@ -116,3 +119,47 @@ git rebase -i hash | |
git config --global credential.helper 'cache –timeout=3600' #保存一小时 | ||
``` | ||
|
||
|
||
|
||
##### centOS升级git版本 | ||
|
||
```go | ||
1. 卸载旧版git | ||
yum remove git | ||
|
||
2.安装必要的依赖 | ||
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker | ||
|
||
3.切换到路径 | ||
mkdir -p /data/lib | ||
cd /data/lib | ||
|
||
4.下载源码 | ||
wget https://www.kernel.org/pub/software/scm/git/git-2.17.1.tar.xz | ||
|
||
5.解包 | ||
tar -vxf git-2.17.1.tar.xz | ||
|
||
6.切换路径 | ||
mv git-2.17.1 git2.17.1 | ||
cd git2.17.1 | ||
|
||
7.编译安装 | ||
./configure --with-openssl=/usr/local/openssl | ||
|
||
8.编译 (如果这一步出错可能是openssl版本太低,1.0版本)这时候需要先升级到1.1.x版本 | ||
make | ||
|
||
9.安装 | ||
make install | ||
|
||
10.检查(有输出证明好了) | ||
./git --version | ||
|
||
11.打开环境变量配置文件,修改环境变量 | ||
vim /etc/profile.d/sh.local | ||
|
||
#在底部加上git相关配置 | ||
export PATH=/data/lib/git2.17.1:$PATH | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,9 @@ gomonkey 不支持 Mac M2 芯片:使用如下方法运行测试: | |
##### gomod graph | ||
|
||
绘制依赖图 | ||
|
||
|
||
|
||
**安装** | ||
|
||
wget |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters