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
The equivalent .gitconfig
is:
# This is Git's per-user configuration file.
[pull]
rebase = true
References
Written with StackEdit.