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
相关推荐
zzzzls~3 小时前
Vibe Coding 最佳实践:Claude Code 检查点回溯与 Git 自动存档每轮对话
git·ai·claude·vibe coding·checkpointing
ssshooter4 小时前
彻底搞懂 SSH 与 Git 的“幕后交易”
git·github·全栈
Asurplus8 小时前
Centos7安装Git环境
git·centos·yum·dnf
m0_743125139 小时前
claude --version 报错Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win).
开发语言·git·bash
AntoineGriezmann10 小时前
Git:新建功能分支并解决 Merge 冲突
git
Sylus_sui12 小时前
Git快速创建并推送新分支
git
悠悠子衿1213813 小时前
Claude+VSCODE配置git导致频繁弹出git bash 的CMO窗口解决方法
ide·git·vscode
QC七哥14 小时前
伪造git提交记录生成点阵字符
git·github
HilariousDog15 小时前
git仓库中克隆文件同时保存line history / 行提交历史的方法介绍
git
TimberWill15 小时前
GitHub Copilot 一键生成中文commit提示语规则设置
git·github