将编译器设置为代理:

设置代理,将端口号改为你自己的代理端口号

git config --global http.proxy http://127.0.0.1:10887
git config --global https.proxy http://127.0.0.1:10887

取消全局代理

git config --global --unset http.proxy
git config --global --unset https.proxy

部分常用命令

查看系统config

git config --system --list

查看当前用户(global)配置

git config --global  --list

查看当前仓库配置信息

git config --local  --list

可见--global中存储了提交用户的email和用户名 如果需要手动设置则可以使用如下指令

git config --global user.name "myname"
git config --global user.email  "test@gmail.com"