Cheatsheet Pages / Git Cheatsheet
How to squash or reword recent commits — git rebase -i
Your last few commits are a mess of fixups and you want them cleaned up before opening a pull request.
git rebase -i HEAD~3 # opens an editor: pick / squash / reword / drop
Good to know
Squash, reorder, reword, or drop your last few commits before sharing. Same golden rule as any rebase: only rewrite commits nobody else has pulled.
