How can I recover a lost commit in Git?

git

Solution

`git reflog` is your friend. Find the commit that you want to be on in that list and you can reset to it (for example:`git reset --hard e870e41`).

(If you didn't commit your changes... you might be in trouble - commit early, and commit often!)

Problem

First, got "your branch is ahead of origin/master by 3 commits" then my app has reverted to an earlier time with earlier changes. How can I get what I spent the last 11 hours doing back?

Original source

Related problems