You ran `git reset --hard HEAD~5` to 'clean up', then realized 3 of those commits weren't pushed anywhere. Panic.
The commits exist in the reflog for ~90 days. Reflog is your time machine.
Hard · 5 steps · +700 XP
This scenario walks through 5 steps, in order:
Try the terminal first — you learn more by doing. When you want to check yourself, here is the command for each step.
git refloggit show HEAD@{5}git branch recovery HEAD@{5}git switch recoverygit log --onelineReflog saves lives. Reset --hard is reversible — until gc runs.