设置全局代理
git config --global http.proxy 'socks5://127.0.0.1:10808'
git config --global https.proxy 'socks5://127.0.0.1:10808'
取消全局代理
git config --global --unset http.proxy
git config --global --unset https.proxy
设置当前项目代理
可以单独给某个项目设置代理,用参数–local
git config --local http.proxy 'socks5://127.0.0.1:10808'
git config --local https.proxy 'socks5://127.0.0.1:10808'
取消本地项目代理
git config --local --unset http.proxy
git config --local --unset https.proxy