gpt4 book ai didi

git - 如何验证 BFG Repo-Cleaner 是否已从 git 存储库中正确删除大文件?

转载 作者:太空狗 更新时间:2023-10-29 13:35:50 24 4
gpt4 key购买 nike

我已经使用 BFG Repo-Cleaner 从 git 存储库中删除了一个大文件:

java -jar ../bfg-1.11.8.jar --delete-folders escrow application.git
cd application.git
git reflog expire --expire=now --all
git gc --prune=now --aggressive
cd ..
mkdir clone
cd clone
git clone file:///home/damian/temp/TCLIPG-4370/test/application.git

我在运行 BFG Repo-Cleaner 之前和之后使用脚本 ( http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/ ) 检查了我的存储库,它显示了托管目录的删除,并且两个存储库中的内存也减少了。

一切看起来都很好,但我如何验证我所有的提交是否相同?我是否必须使用 git-for-each-ref 创建脚本并比较两个存储库中具有相同名称的提交,以验证 BFG 是否正常工作?

如有任何建议,我们将不胜感激。

最佳答案

您可以从 Eric S. Raymond 的 repodiffer(他的 reposurgeon 项目的一部分)获得独立意见:http://www.catb.org/~esr/reposurgeon/repodiffer.html

你可以这样使用它:

$ repodiffer old-repo-copy.git new-repo-copy.git

该脚本可能需要一段时间才能运行,但它会准确告诉您这两个存储库之间发生了什么变化。输出的小样本:

...
1a54b66 -> 9b11d44: same differences as for 5c572dc -> 6e8307c.
changed: e00a601 -> 30a42c8 in tree.
L only:
frontend/assets/big.mp4
R only:
frontend/assets/big.mp4.REMOVED.git-id
...

完全披露:我是 BFG Repo-Cleaner 的作者。

关于git - 如何验证 BFG Repo-Cleaner 是否已从 git 存储库中正确删除大文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25874673/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com