git pull
= git fetch
+ git merge
against tracking upstream branch
git pull --rebase
= git fetch
+ git rebase
against tracking upstream branch
An easier way to understand the difference is this way:
If you have 3 commits A, B & C.
Then developer X creates a commit D and developer Y creates a commit E.
To resolve this conflict, there are 2 ways:
MERGE:
Both commits D & E are still there but a merge commit M is created containing the changes from D & E.
REBASE:
We create commit R which content is identical to merge commit M, but we get rid of E. Advantage is that diamond shape is avoided and history stays nice in a straight line.