# 设置全局代理(所有仓库生效)
git config --global http.proxy http://127.0.0.1:1080 # HTTP 代理
git config --global https.proxy http://127.0.0.1:1080 # HTTPS 代理
取消
git config --global --unset http.proxy
git config --global --unset https.proxy
# 设置 socks5 代理(如 Shadowsocks/V2Ray)
git config --global http.proxy socks5://127.0.0.1:1080
git config --global https.proxy socks5://127.0.0.1:1080
# 取消 HTTP 代理设置
git config --global --unset http.proxy
# 取消 HTTPS 代理设置
git config --global --unset https.proxy