It is always better to rebase local commits while pulling remote published changes. git merge will create a
merge entry in the history, rebase is preferred because it orders your local commit on top of the latest remote commits.
To avoid typing
--rebase whenever you pull you can config git to use it as default:
git config --global pull.rebase true
# This is Git's per-user configuration file. [pull] rebase = true
Written with StackEdit.