git是程序开发不可少的软件

设置邮箱和用户名

1
2
git config --global user.email "[email protected]"
git config --global user.name "Maxcrazy1101"

设置代理

有时候国内网络访问github会有连接超时错误,需要给git配置一下代理
http代理

1
2
3
git config --global http.proxy 127.0.0.1:7890
git config --global https.proxy 127.0.0.1:7890

socks5代理

1
2
3
git config --global http.proxy socks5 127.0.0.1:7890
git config --global https.proxy socks5 127.0.0.1:7890

查看代理

1
2
3
git config --global --get http.proxy
git config --global --get https.proxy

取消代理

1
2
3
git config --global --unset http.proxy
git config --global --unset https.proxy