git上传报错:Object too large, rejecting the pack

在gerrit设置了最大不能上传超过600M的文件,今天开发遇到推送问题:

结果到本地怎么也找不到大文件。

后来只能按commit排查,用如下命令排查到了:

解决方法,将大文件去掉:(commitid为大文件所在commit)

复制代码
git reset commitid^
rm filename
# 重新提交
git add --all
git commit -m 'xxx'
#t 重新推送
git push origin xxx
相关推荐
吹牛不交税1 天前
visualstudio把项目绑定git仓库
git
c238561 天前
git常见错误和ssh验证推送
运维·git·ssh
火山上的企鹅1 天前
Codex实战:APP远程升级服务搭建(四)Node 服务端自动识别 APK 信息
android·服务器·git·github·qgc
徐子元竟然被占了!!2 天前
Git学习
git·学习·elasticsearch
l1o3v1e4ding2 天前
windows安装Claude Code,并接入Deepseek-v4模型 ,提供离线安装包
git·npm·node.js·claude code·cc-switchcc
Dontla2 天前
git bash打开Claude code报错:Claude Code on Windows requires git-bash.(别把git装其他位置,严格按照默认安装)找不到claude code
windows·git·bash
一个梦醒了2 天前
安装git bash选项推荐
开发语言·git·bash
呆萌的代Ma2 天前
Git不强行推送,撤销最近几次的提交
git
透明的玻璃杯2 天前
git应用
git
炸炸鱼.2 天前
Git+Jenkins实战(一):从零搭建自动化发布与回滚系统(附完整代码)
git·jenkins