8

您好,我的 git-fsck 出现以下错误,即使在 --aggressive 模式下也无法被 git-gc 清除。接下来我可以做什么来修复这个存储库错误?

$ git-fsck
bad sha1 file: .git/objects/55/tmp_obj_a07724
4

3 回答 3

7

可悲的是,这不是一个简单的答案。但这可能会有所帮助:

从存储库损坏中恢复(来自 Git 的用户手册)。

于 2008-09-02T16:17:20.587 回答
7

错误...tmp_obj_a07724可疑地看起来像一个剩余的临时文件:)

如果您只是将它从.git目录中移开(在整个备份之后)会发生什么?

于 2008-09-04T20:44:10.413 回答
0

来自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).
于 2018-03-21T11:10:38.050 回答