Git & CollaborationBeginner
Squash and Merge
PronunciationSKWOSH and MURJ
Definition
Squash and Merge is a git workflow that combines all individual commits from a feature branch into a single new commit on the target branch. This keeps the project history clean and easy to read by removing intermediate work-in-progress commits.
Where you hear it
In pull request settings, code review discussions, and repository management guidelines.
Examples
We prefer to use Squash and Merge to keep our main branch history clean.
Please perform a Squash and Merge so that each feature appears as one commit.
Common mistake
Thinking that squashing deletes your work; it only combines the history of the commits, while the final code state remains exactly the same.
Keep exploring
More in Git & Collaboration