git 提示 fatal: The remote end hung up unexpectedly

我在 git push 的时候遇到报错 fatal: The remote end hung up unexpectedly
解决方法如下:

1. 调整缓存限制(大文件推送)

git config --global http.postBuffer 524288000  # 设置缓存为500MB
git config --global https.postBuffer 524288000  # 设置缓存为500MB

2. 优化网络传输设置

git config --global http.lowSpeedLimit 0       # 禁用最低传输速度限制
git config --global http.lowSpeedTime 999999   # 延长超时时间

题外话,对大文件进行管理的时候,千万不要忘记用Git LFS
使用Git LFS管理大文件

git lfs install                   # 安装Git LFS扩展
git lfs track "*.psd"             # 跟踪指定类型的大文件
git add .gitattributes            # 提交跟踪配置
git add file.psd && git commit -m "Add large file"  # 常规提交
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值