Skip to content

Squash

Medium — good to knowGit & Version Control

ELI5 — The Vibe Check

Squash is like combining multiple save points into one. Instead of having 15 tiny commits like 'fix typo', 'oops forgot file', 'actually fix it', you squash them all into one clean commit that says 'Add login feature'. Much cleaner history!

Real Talk

Squashing combines multiple commits into a single commit. This is typically done during an interactive rebase or when merging a PR. It results in a cleaner, more readable commit history.

Show Me The Code

git rebase -i HEAD~5
# Mark commits as 'squash' or 's' in the editor

# Or squash merge a PR:
git merge --squash feature-branch

When You'll Hear This

"Squash your commits before merging." / "Use squash merge for cleaner history."

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