Interview Prep/Git & GitHub/Merge, rebase and cherry-pick

What are squash merge, merge commit and rebase-and-merge on GitHub?

IntermediateConceptMerge, rebase and cherry-pick
Answer

Merge commit keeps every commit plus a merge commit. Squash merge collapses the PR into one commit on the base branch, giving one commit per PR but losing granular history and making the branch look unmerged to Git. Rebase and merge replays each commit onto the base without a merge commit, creating new SHAs. Admins can restrict which methods are allowed per repo.

All Git & GitHub questions Roadmap: Git & GitHub

More on Merge, rebase and cherry-pick