Comparisons

Git Merge vs Rebase vs Squash

Venn Diagrams · made in Skemio

Venn diagram comparing Git Merge, Git Rebase, and Git Squash showing overlaps in linearity and commit retention.
Venn diagram comparing Git Merge, Git Rebase, and Git Squash showing overlaps in linearity and commit retention.

What it shows

  • Git Merge keeps full branch context with non-destructive merge commits.
  • Git Rebase creates a clean, linear history by replaying commits on main.
  • Git Squash consolidates work-in-progress commits into one atomic change.

The takeaway

Merge to preserve context, rebase to keep history linear, and squash to eliminate commit noise.

More venn diagrams