有没有办法 git 校验存储库的完整性?

Is there a way for git to checksum a repository for sanity?

我刚刚从遭受文件系统损坏的服务器中提取了一个旧的裸存储库。

git是否有任何机制来检查裸存储库是否存在损坏的 blob?

我认为您正在寻找 git fsck 命令,"Verifies the connectivity and validity of the objects in the database"。