1

I've been working on some files for 2 days.

Today I wanted to do a "git up" on my codebase, so I did my usual:

git stash save
git up
git stash pop

But I got a little surprise:

error: object file .git/objects/05/f771480d6a6bde54b3dacc4b6dc1920027e6d5 is empty
error: object file .git/objects/05/f771480d6a6bde54b3dacc4b6dc1920027e6d5 is empty
fatal: loose object 05f771480d6a6bde54b3dacc4b6dc1920027e6d5 (stored in .git/objects/05/f771480d6a6bde54b3dacc4b6dc1920027e6d5) is corrupt

Is there a way for me to retrieve my lost file (only one is very important)?

Here is the alias I am using for git up:

 up = !git pull --rebase=preserve origin \"$(git rev-parse --abbrev-ref HEAD)

Thank you

Andrei
  • 1,103
  • 2
  • 17
  • 40
  • yes it's an alias, I've added it in my post – Andrei Feb 03 '15 at 15:16
  • 1
    There is a terrific response on Stack Overflow [here](http://stackoverflow.com/questions/11706215/how-to-fix-git-error-object-file-is-empty). It is pretty advanced, so maybe weigh that against the amount of time you would lose by abandoning the lost work. – Tim Biegeleisen Feb 03 '15 at 15:41
  • Thanks Tim, but yea I'm just a git beginner, I think I can maybe rewrite the file from memory faster than it will take me to understand all these commands and run them. – Andrei Feb 03 '15 at 15:46

0 Answers0