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 Rebase - Missing Merge requests while rebasing with master
  • GIT: how to remove a push that is in the middle of the working tree
  • Setting up webhooks with an independent git server?
  • What's the correct command to revert my files in git?
  • Why is the git command to switch branches named “git checkout”?
  • Git Azure deployment missing files from content directory (MVC4 project)
  • Get tags below a particular tag in git
  • Reset git proxy to default configuration
  • Recommended Git tools for windows
  • In GIT, is it safe change core.autocrlf to false?
  • Detect when the remote tracked branch has been force updated in Git
  • No branches in SourceTree?
  • 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.