Five "WIP" commits? Three "fix typo" commits? Squash them into one clean, meaningful commit before merging. Tidy history, happy team.
Your feature branch has 6 commits that should really be one:
"WIP", "fix typo", "oops forgot file", "actually fix it",
"lint fix", "final version"
Squash combines them all into a single, clean commit
with a proper message. Use
git merge --squash
or git rebase -i.
One clean commit with a proper message. The messy WIP commits
are gone. Your PR reviewers will thank you.
When to squash: before merging feature branches,
cleaning up "fix typo" chains, or combining related small changes.
Most teams use "Squash and Merge" on GitHub PRs — it squashes automatically when merging a pull request.