Ran out of battery during a git operation
왠만하면 그냥 clone and copy
git fsck --full rm {{object file}} git fsck --full git reflog tail -n 1 .git/logs/refs/heads/{{branch}} git show {{target hash}} git update-ref HEAD {{target hash}} git fsck --full rm .git/index git fsck --full git status git add . git commit -am "blabla"
git stash removing git file in error (not sure that is necessary) git stash clear
How to fix GIT error: object file is empty?
I had a similar problem. My laptop ran out of battery during a git operation. Boo. I didn't have any backups. (N.B. Ubuntu One is not a backup solution for git; it will helpfully overwrite your sane repository with your corrupted one.)
https://stackoverflow.com/questions/11706215/how-to-fix-git-error-object-file-is-empty

Seonglae Cho