1

My git repository got corrupted after a couple of hard reboots due to power supply issues and now I'm unable to fix it and after verification of logs files (in .git\logs\refs\heads) i ve seen my branche with commit:

0000000000000000000000000000000000000000 2af7fde85969d445579df272716e8d78db9 user <user_mail> 1372352519 +0100  branch: Created from branch refs/heads/master
null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null

and i have verified logs and copied to the corrupted file the line related to my commit and replace nulls with this

2af7fde85969d445579df272716e8d78db9 6c668139241332dbc7c7462a49978006de0 user <user_mail> 1372352552 +0100   commit: assignement report not verified

I have restared Eclipse and switch to my last commit and i always have the same error::

Branch failed
Object 6c668139241332dbc7c7462a49978006de0 is corrupt: invalid type

So, as you can see, my current branch is pretty screwed up and I don't seem to be able to fix it. Any ideea what can I try to repair this?

Drwhite
  • 1,545
  • 4
  • 21
  • 44
  • Did you try `git fsck` ? – Guillaume Darmont Jun 28 '13 at 09:46
  • Look at this one: http://stackoverflow.com/questions/1545407/recovering-broken-git-repository – Tobias Ritzau Jun 28 '13 at 10:16
  • @GuillaumeDarmont: this are result of check: `error: unable to unpack 6c668139241332dbc7c7462a49978006de0 header error: inflateEnd: stream consistency error (no message) fatal: loose object 6c668139241332dbc7c7462a49978006de0 (stored in D:/Projets/myproject - Copie/.git/objects/6c/668139241332dbc7c7462a49978006de0) is corrupt` – Drwhite Jun 28 '13 at 10:39
  • Wait: Did you actually manually change the contents of a file in `.git/objects/`? – Chronial Jun 28 '13 at 14:14
  • @Chronial: No, the content of the object in `.git/objects/` show me `null null....` it was broken, but i have modified this one: .git\logs\refs\heads\myBranche – Drwhite Jun 28 '13 at 15:55
  • ok, move the `.git/objects/6c/668139241332dbc7c7462a49978006de0` file out of the project directory and run `git fsck` again, pls. – Chronial Jun 28 '13 at 18:12

0 Answers0