git config命令使用

一、git全局配置

1.1 查看所有全局配置项

git config -l

1.2 代理设置

全局配置代理https.proxy

使用Https或者Http代理

// 全局配置代理https.proxy
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080

使用Sockets代理

git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'

例如以下最简单的设置:
在这里插入图片描述

移除全局代理设置

git config --global --unset http.proxy
git config --global --unset https.proxy

解释:http.proxy或https.proxy为名称

posted @ 2020-03-01 19:18  Jonny-Xhl  阅读(189)  评论(0编辑  收藏  举报