git 提示 fatal: The remote end hung up unexpectedly

我在 git push 的时候遇到报错 fatal: The remote end hung up unexpectedly

解决方法如下:

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

bash 复制代码
git config --global http.postBuffer 524288000  # 设置缓存为500MB
git config --global https.postBuffer 524288000  # 设置缓存为500MB

2. 优化网络传输设置

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

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

bash 复制代码
git lfs install                   # 安装Git LFS扩展
git lfs track "*.psd"             # 跟踪指定类型的大文件
git add .gitattributes            # 提交跟踪配置
git add file.psd && git commit -m "Add large file"  # 常规提交
相关推荐
码农黛兮_4621 分钟前
Git 常用命令大全
git
一弓虽38 分钟前
git 学习
git·学习
疯狂的沙粒9 小时前
如何通过git命令查看项目连接的仓库地址?
大数据·git·elasticsearch
qq_2546177710 小时前
Gerrit+repo管理git仓库,如果本地有新分支不能执行repo sync来同步远程所有修改,会报错
git
π大星星️10 小时前
Git分布式版本控制工具
分布式·git
kingbal11 小时前
IDEA:配置 Git 需要完成 Git 路径设置、账号认证以及仓库关联三个主要步骤
git·idea
司徒小夜1 天前
处理git没做修改,但是文件显示变更的情况
git
m0_749317521 天前
vscode里如何用git
ide·git·vscode
Hello.Reader1 天前
Git 安装全攻略Linux、macOS、Windows 与源码编译
linux·git·macos
王景程1 天前
SELinux是什么以及如何编写SELinux策略
git·github