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

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
All Git & GitHub questions Roadmap: Git & GitHub

More on Merge, rebase and cherry-pick