访问所有远程仓库走都代理:
git config --global http.proxy 'socks5://127.0.0.1:1080'
只针对github
的访问走代理:
git config --global http.https://github.com.proxy 'socks5://127.0.0.1:1080'
走代理前:
走代理后速度明显提升:
取消代理:
git config --global --unset http.proxy
# or
git config --global --unset http.https://github.com.proxy
查看代理配置是否被取消:
git config -l