Git常用命令
- git中设置全局代理:
git config --global http.proxy http://192.168.1.200:10809
git config --global https.proxy https://192.168.1.200:10809
- 取消全局代理:
git config --global --unset http.proxy
git config --global --unset https.proxy
- 针对github进行单独设置:
# 只针对github.com进行代理
git config --global http.https://github.com.proxy http://192.168.1.200:10809
git config --global https.https://github.com.proxy https://192.168.1.200:10809
# 取消对github.com的代理
git config --global --unset http.https://github.com.proxy
git config --global --unset https.https://github.com.proxy
- 查看当前用户的全局配置
git config --global list
显示错误解决办法
- 显示“error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054”
git config --global http.sslVerify "false"
- 将文件夹忽略安全检测
git config --global --add safe.directory "*"