返回 Bug 清单
BUG-0510project-52中已修复frontend-integration
Git push 自动打包损坏对象导致 fatal: data stream error,无法跳过坏 blob 单独推好的提交
发现:2026-10-07验证:2026-10-27置信度:70%
症状
批量推送 bloomwish/project-23-core 等仓库报 inflate: data stream error。git fsck 报 missing blob 或 dangling blob。push 失败但 git rev-parse HEAD 正常(HEAD 不依赖那个坏对象)。
根因
git push 会把本地所有需要传输的对象打包成 packfile。只要 HEAD 依赖链上有任何损坏的 loose object(哪怕是一个无用的历史 blob),整个 push 就会失败。git 没有'跳过坏对象只推好的'的选项。批量推送时 10 个仓库报这个错,每个 fsck 都有不同的 dangling blob 损坏。
修复方案
3 种修复从快到稳:(1) git fsck --full 找到坏对象 blob id → 删掉对应 .git/objects/xx/yyyyyy 文件 → 可能还能推;(2) 如果坏对象在 HEAD 历史中,删 .git → git init -b main → git add -A → git commit → force push(丢历史但代码无损);(3) 从远程 clone 干净副本替换本地。预防:git config --global fsck.zeroPaddedFilemode ignore + 杀毒排除 .git 目录 + 定期 fsck。
错误签名
git push: fatal: loose object xxx is corrupted / inflate: data stream error / fatal: index-pack failed技术信息
来源项目
project-52
涉及文件
.git/objects/xx/yyyyyy (loose object), .git/index
标签
project-52, mcp-reported, source-agent