What is `git merge --squash` and how is it different from a squash on GitHub?
IntermediateConceptMerge, rebase and cherry-pick
Answer
It stages the combined changes from the branch but does not create a commit or record a merge parent. You commit it yourself. GitHub's squash merge does the same server-side and uses the PR title and description as the message.
git merge --squash feature && git commit
More on Merge, rebase and cherry-pick
What is the difference between a fast-forward merge and a merge commit?BeginnerHow does a three-way merge work?IntermediateWhat does `git rebase` actually do?IntermediateMerge versus rebase: how do you decide?IntermediateWhat are squash merge, merge commit and rebase-and-merge on GitHub?IntermediateWhy does a squash-merged branch show as unmerged to `git branch --merged`?Intermediate