If you haven't made any changes to your local copy of the branch, the two sets of commands will result in exactly the same history. The difference comes into play when you have made local commits to your current copy of the branch.
If you do git pull
any changes made on the remote will be merged into your local branch and you'll have a merge commit in the history. On the other hand, if you do a fetch followed by a rebase (or git pull --rebase
) your local changes will be replayed on top of the remote changes. This results in a cleaner history since you'll have less merge commits cluttering the history.
It also often makes your changes easier to merge upstream since the history before your new commits matches the history on the remote.