您好,我的 git-fsck 出现以下错误,即使在 --aggressive 模式下也无法被 git-gc 清除。接下来我可以做什么来修复这个存储库错误?
$ git-fsck
bad sha1 file: .git/objects/55/tmp_obj_a07724
您好,我的 git-fsck 出现以下错误,即使在 --aggressive 模式下也无法被 git-gc 清除。接下来我可以做什么来修复这个存储库错误?
$ git-fsck
bad sha1 file: .git/objects/55/tmp_obj_a07724
可悲的是,这不是一个简单的答案。但这可能会有所帮助:
从存储库损坏中恢复(来自 Git 的用户手册)。
错误...tmp_obj_a07724
可疑地看起来像一个剩余的临时文件:)
如果您只是将它从.git
目录中移开(在整个备份之后)会发生什么?
来自man git-fsck
:
Any corrupt objects you will have to find in backups or other archives
(i.e., you can just remove them and do an rsync with some other site in
the hopes that somebody else has the object you have corrupted).