跳转至

Git常用配置

查看配置

config 配置有system级别 global(用户级别) 和local(当前仓库)三个 设置先从system global local  底层配置会覆盖顶层配置 分别使用system/global/local 可以定位到配置文件

查看系统config

git config --system --list

查看当前用户(global)配置

git config --global  --list

查看当前仓库配置信息

git config --local  --list

代理配置

配置全局代理

设置代理

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

取消设置代理

git config --global --unset http.proxy #配置http代理
git config --global --unset https.proxy #配置https代理

仅配置Github代理

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