Git“坏sha1文件”错误

时间:2008-09-02 13:14:49

标签: git version-control

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

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

3 个答案:

答案 0 :(得分:7)

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

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

答案 1 :(得分:6)

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

Recovering from repository corruption(来自Git的用户手册)。

答案 2 :(得分: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).