Here is what worked for me:
- Use
git reflogcommand to find out the head version that disappeared. - Use
git checkout @{-1}to move HEAD back to the one disappeared. The number-Xis how many commits the disappeared from current head.-1means the disappeared version is1commit away from current HEAD. - Create a branch to save the disappeared version