Skip to content

Reset

Spicy — senior dev territoryGit & Version Control

ELI5 — The Vibe Check

Reset is like pressing undo on your commits. It can be gentle (keep your changes but uncommit them) or nuclear (delete everything and go back to a previous state). Use with caution — the nuclear option can't be undone easily!

Real Talk

Git reset moves the HEAD and current branch pointer to a specified commit. Soft reset keeps changes staged, mixed (default) keeps changes unstaged, and hard reset discards all changes. Hard reset is destructive and should be used carefully.

Show Me The Code

git reset --soft HEAD~1   # undo commit, keep staged
git reset HEAD~1          # undo commit, keep unstaged
git reset --hard HEAD~1   # undo commit, DELETE changes

When You'll Hear This

"Reset to the last commit." / "Be careful with hard reset — you'll lose your changes."

Made with passive-aggressive love by manoga.digital. Powered by Claude.