首页 > 解决方案 > 为什么 git repack 在“filter-repo”中失败?

问题描述

我有一个git fsck --strict --full返回的仓库,现在我在每个提交中0添加一个文件,并在此处或此处等效的脚本。命令:.gitattributesgit filter-repo

FILTER_BRANCH_SQUELCH_WARNING=1 \
    git filter-branch -f \
    --index-filter \
    "cp -f '$outDir/.gitattributes' .gitattributes && git add .gitattributes" \
    --tag-name-filter cat \
    --prune-empty -- --all

哪个失败了

Repacking your repo and cleaning out old unneeded objects
Counting objects: 100% (571811/571811), done.
Delta compression using up to 14 threads
Compressing objects: 100% (108091/108091), done.
error: bad packed object CRC for e9975de53768c33397b84bdad69b9c3e7a0aaba6
error: bad packed object CRC for e9975de53768c33397b84bdad69b9c3e7a0aaba6
fatal: packed object e9975de

我在这里完全没有希望,我不知道我做错了什么?如果磁盘已满,是否会再次出现故障,并且我检查了我有足够的空间,也在系统上......?

注意:我在 ubuntu:focal 上使用 git build 2.27.0,在带有 Windows 主机的 Virtual Box 6.1 上使用 SSD,其中存储库位于 .vdi图像中。

更新:有时会失败,有时会通过???

标签: git

解决方案


推荐阅读