只对GitHub进行代理(推荐)
git config --global http.https://github.com.proxy socks5://127.0.0.1:7790
配置Git使用SOCKS5代理
git config --global http.proxy 'socks5://127.0.0.1:10808'
git config --global https.proxy 'socks5://127.0.0.1:10808'
配置Git使用HTTP代理
git config --global http.proxy 'http://127.0.0.1:10809'
git config --global https.proxy 'http://127.0.0.1:10809'
验证配置
git config --global --get http.proxy
git config --global --get https.proxy
取消代理配置
git config --global --unset http.proxy
git config --global --unset https.proxy