公司内网 git 访问外网需要设置代理,而一般网上给出的设置方法是 git config --global http.proxy ***.***.**.**:8080。
局部配置,只在当前项目目录下配置代理
1.局部配置:git config --local http.proxy 10.***.***.***:****(域名:端口)或者是 git config http.proxy 10.***.***.***:****(域名:端口),git clone时需要配置全局,之后可切换为局部配置
2.全局配置:git config --global http.proxy 10.***.***.***:****(域名:端口)
3.查看:git config --get --global http.proxy
4.取消:git config --global --unset http.proxy
5.查看git配置:git config --list
ERROR:
在使用git推送项目时候出现 "fatal: The remote end hung up unexpectedly " 原因是推送的文件太大
在Git的config文件内添加,设置本地缓存大小
[http]
postBuffer = 524288000