More precisely, git pull
runs git fetch
with the given parameters and calls git merge to merge the retrieved branch heads into the current branch. With --rebase, it runs git rebase instead of git merge.
If you pull remote changes with the flag --rebase, then your local changes are reapplied on top of the remote changes.
git pull --rebase
If you pull remote changes with the flag --merge, which is also the default, then your local changes are merged with the remote changes. This results in a merge commit that points to the latest local commit and the latest remote commit.
git pull --merge