Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git "bad sha1 file" error

Hello I have the following error by git-fsck, which cannot be cleaned by git-gc even in --aggressive mode. What can I do next to fix this repository error?

$ git-fsck
bad sha1 file: .git/objects/55/tmp_obj_a07724
like image 731
Artem Tikhomirov Avatar asked Sep 02 '08 13:09

Artem Tikhomirov


2 Answers

It's not a simple answer, sadly. But this might help:

Recovering from repository corruption (from the Git's user manual).

like image 136
Jordi Bunster Avatar answered Nov 06 '22 00:11

Jordi Bunster


Err... tmp_obj_a07724 suspiciously looks like a leftover temporary file :)

What happens if you simply move it away from the .git directory (after a backup of the whole thing)?

like image 41
Damien Diederen Avatar answered Nov 05 '22 23:11

Damien Diederen