11 commits including 'WIP', 'fix typo', 'actually fix it'. Tech lead won't approve.
Squash 11 messy commits into one clean commit — no rebase editor needed.
Medium · 5 steps · +500 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 log --onelinegit reset --soft HEAD~11git commit -m "feat: dashboard"git push --force-with-leasegit log --oneline11 → 1 clean commit. `git reset --soft` rewinds the branch pointer while leaving every change staged, so the follow-up `git commit` replaces the whole run — the editor-free equivalent of pick + squash.