0

I was working on a project last night and committing all my changes but NOT checking them in to the repo, which is my bad.

However this morning I had a small issue with object file is empty and followed the steps in the answer (deleting the damaged object files).

I continued with my git commits, merges and so on, but when I went to push my new tag to github, I saw that none of my changes were in there.

So I did a git log and see NONE of my previous commits. where are they? Is all my work lost? My last commit in the log was from April.....

Update

I did a git fsck --unreachable:

###@######:~/####/###/Aisis-Framework$ git fsck --unreachable
Checking object directories: 100% (256/256), done.
Checking objects: 100% (8675/8675), done.
broken link from    tree 48d988ab8e70a2cd914bcf25ca3b306108a47fc1
              to    blob a3f00c48ae551785c50de092734c988eca4c0e0a
unreachable blob 2090973ca264991ec96d19ebd326d4c95dbae692
unreachable blob 231c62f4a8ea2fa6ccebe40e819046838e12ad1a
unreachable blob 66a2a7c461ac0ca24cbcde6b073bfde1b80daee8
unreachable blob 33a4ad126b514928010bc88aff3fbb3ef51cfaa7
unreachable blob a524ad7bff264b084c48d4325480313d7ed8b3ed
unreachable blob acde3d0e65d1dfc8e7ec3dd3f585e53564828afa
unreachable blob 7f6056fc3f08e552f257eb1bf3bf173d923fe0dc
unreachable tag ee6283bdf5b1f486eb3a6ca53604f474d6a240b0
missing blob a3f00c48ae551785c50de092734c988eca4c0e0a
unreachable blob 84f610d9133548e8aca1c7c4af6ff4c74931390a
unreachable blob 35773cf6313d506598e7e26c2f06422fc0a83471
Community
  • 1
  • 1
TheWebs
  • 10,087
  • 21
  • 77
  • 164
  • Is there anything in your reflog? What does `git fsck --unreachable` say? –  Jun 07 '13 at 14:14
  • 1
    @TheShadow Please see updated OP – TheWebs Jun 07 '13 at 14:17
  • So try `git show` on those unreachable blobs, see what's in there ... – Useless Jun 07 '13 at 14:59
  • how do you restore these unreachable blobs? as when I do a show it shows me my php files and other code files @Useless – TheWebs Jun 07 '13 at 15:04
  • 1
    If you can figure out which is the last commit (and assuming the parent/child relationships are intact), you can just use `git branch my-lost-commits ` to rescue them. Then, merge the branch. – Useless Jun 07 '13 at 15:24
  • I think you might only be able to apply a branch to a commit object. Do blobs just represent files? @TheWebs is the above the entire output of `git fsck --unreachable`? What does `git reflog` say? –  Jun 07 '13 at 17:04
  • @TheWebs does `git log --oneline --all --decorate` say anything? –  Jun 07 '13 at 17:06

0 Answers0