I'm trying to understand the difference between a squash and a rebase. As I understand it, one performs a squash when doing a rebase.
Question
Answer
Merge commits: retains all of the commits in your branch and interleaves them with commits on the base branch
Merge Squash: retains the changes but omits the individual commits from history
Rebase: This moves the entire feature branch to begin on the tip of the master branch, effectively incorporating all of the new commits in master
More on here
The first two diagrams come from About pull request merges on the GitHub Docs