Lost a git commit

I have the hash for a git commit I made a few weeks ago. I tried checking it out but it says that the hash “did not match any file(s) known to git”. I also looked for it in git reflog, but don’t see it there. I don’t see the earliest commits I made in reflog either.

I couldn’t find the missing commit in my remote repository in Gitorious either. However, I do see the earliest commits I made in Gitorious, just not the one I’m looking for.

  • Git GUI like Bzr Explorer but for Git?
  • How to handle files committed to Git on Linux with invalid Windows filenames?
  • git branches and running programs
  • git - dont ask for password at pull
  • Git GUI like Bzr Explorer but for Git?
  • Git slow when cloning to Samba shares
  • issue in composer update after pulling a yii project from git
  • Only one user can push/pull to github
  • One Solution collect form web for “Lost a git commit”

    Well, the commit no longer exists in your database, which is unfortunate. Start with a git lost-found just in case you have the hash wrong.

    If it disappeared because it was garbage collected, you’re out of luck. If it disappeared for any other reason (disk corruption, file system bug, etc.), you may still be able to find the blobs that were in that commit.

    git fsck can tell you if there are any problems with git’s internal database. If that doesn’t turn up anything, try this: How to recover LOST WORK resulting from the use of git?

    Git Baby is a git and github fan, let's start git clone.