What does `git pull --rebase` do differently from `git pull`?
BeginnerConceptMerge, rebase and cherry-pick
Answer
git pull is fetch plus merge, producing a merge commit if histories diverged. git pull --rebase is fetch plus rebase, replaying your local commits on top of upstream and keeping history linear. You can make it the default.
git config --global pull.rebase true
git config --global pull.ff only # alternative: refuse non-ff pulls
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