FahamLah

Commands

git reflog

git reflog

Risk: Safe

What it does

Shows every place HEAD has been.

When to use it

When commits seem lost after a reset.

Example

$ git reflog

Find the lost commit.

$ git reset --hard HEAD@{1}

Jump back to where HEAD was one move ago.