【发布时间】:2019-06-24 15:07:54
【问题描述】:
使用 BFG 删除已删除文件夹的历史记录
我正在使用 BFG 从 repo 中完全删除已删除文件夹的历史记录
git rev-list --all --objects -- path/to/the/directory/to/delete | git cat-file --batch-check='%(objectname) %(objecttype) %(rest)' | grep -Pe '^\w+ blob' |剪切 -d' ' -f1 > ./to-delete.txt java -jar bfg.jar --no-blob-protection --strip-blob-with-ids ./to-delete.txt
我得到了对象 ID 列表,但是当我使用以下命令将对象 ID 传递给 bfg 时,它会抛出错误
java -jar bfg.jar --no-blob-protection --strip-blob-with-ids ./to-delete.txt
错误: java.exe:错误:选项 --strip-blobs-with-ids 在给定“RCC.txt”时失败。 MainException:类 org.eclipse.jgit.errors.InvalidObjectIdException(**无效 id:**??e 4 c 8 e 1 b b 1 7 8 2 4 8 7 1 9 2 9 9 b 0 1 5 b 1 5 0 8 3 9 2 7 b d e f f 5 b) 在 G:\Dev_Migration_Scripts\RepoCleaner_New.ps1:29 char:35
【问题讨论】:
标签: bfg-repo-cleaner