一、git推送报错
通常来说要么是缓存不够,要么是网络不行,要么墙的原因
- 推送的文件太大导致git 推送报错:
"fatal: The remote end hung up unexpectedly"
git大小限制。 git的默认提交文件大小,网上都说是1M。
解决方法
#即修改提交缓存大小为500M
git config --global http.postBuffer 524288000
# some comments below report having to double the value:
git config --global http.postBuffer 1048576000
或者在克隆/创建版本库生成的 .git目录下面修改生成的config文件增加下面语句:
postBuffer = 524288000
- 远程结束挂起 |2KiB/s
fatal: The remote end hung up unexpectedlyB | 2.00 KiB/s
应该是墙的原因导致网速太慢,且项目有点大上传不上
解决办法:翻墙 或者换个网速好的网络重新再push一遍 就没问题了.
- git卡住
git config --global sendpack.sideband false
git config --local sendpack.sideband false
如果第一个设置后可以push成功,就不用设置第二个了
其他配置
配置git的最低速度和最低速度时间:
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
–global配置对当前用户生效,如果需要对所有用户生效,则用–system