3
~$ git commit .
error: inflate: data stream error (incorrect data check)
error: corrupt loose object '26f0654cde5d83f2ed8d971474d9d08a76644087'
fatal: object 26f0654cde5d83f2ed8d971474d9d08a76644087 is corrupted

The object in question doesn't exist and I've been doing commits every other day or so.
Since it doesn't list where this object supposedly is, I don't know what do with it.
I guess my last one was on teh 30th of last month, so I've been pretty off balance as of late but still I don't know why it's doing what it's doing right now.

I've tried git unpack-object -r < objectname and it does nothing. Since the object doesn't exist ANYWHERE on my hdd.


The original bit is now changed:

Nom, I've seemed to have just found it. I didn't realize that it was literally doing 26 as /26/ instead of itself. Apparently the file was made on the 1st of December and since I don't have said object since the last external backup, I believe was a few days before.
What's the best way to go about this?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
133794m3r
  • 5,028
  • 3
  • 24
  • 37
  • If you have a backup, http://stackoverflow.com/questions/801577/how-to-recover-git-objects-damaged-by-hard-disk-failure could help – VonC Dec 03 '10 at 12:48
  • possible duplicate of [Git: "Corrupt loose object"](http://stackoverflow.com/questions/4254389/git-corrupt-loose-object) – ripper234 Feb 20 '12 at 21:25

2 Answers2

1

Try

git stash

This worked for me. It stashes anything you haven't committed and that got around the problem.

Arthur
  • 1,332
  • 2
  • 19
  • 39
0

You will need to take a look at what object this is. You need to determine if it's a blob, tree, commit or (unlikely) a signed or messaged tag. Git has low level manipulation commands to do this.

Take a look at this post.

I would recommend doing a filter-branch or rebase -i --preserve-merges to clean up the history so all sha-1s resolve to proper objects.

Community
  • 1
  • 1
Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141
  • i just ended up copying/replacing all files in the directory and i'm going to try it from there. And it's working again, sadly it's not able to fix the things but at least i did get it working and what you said might work in the future. – 133794m3r Dec 03 '10 at 21:12