Git Reset, Revert, and Restore Cheat Sheet/Use reflog after a mistaken reset

Find the previous branch tip after a bad reset.

Section: Decision Guide

Use reflog after a mistaken reset

bash
bash
git reflog
Explanation

If you used the wrong reset mode or target, reflog is usually the fastest path back.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Decision Guide
Mental model for reset vs restore vs revert
Quick decision guide for the three similarly named commands.
OpenIn sheettextsame section
Create a safety branch before destructive changes
Save a recovery pointer before hard reset or risky history edits.
OpenIn sheetbashsame section
Reset out of a conflicted merge state
Try to leave local changes intact while backing out of a merge-like operation.
OpenIn sheetbash3 tag match
Undo last commit but keep everything staged
Move HEAD back one commit while preserving index and working tree.
OpenIn sheetbash2 tag match
Undo last commit and unstage changes
Move HEAD back one commit and leave changes in the working tree.
OpenIn sheetbash2 tag match
Discard last commit and local changes
Move HEAD back one commit and discard index and working tree changes.
OpenIn sheetbash2 tag match