Git pull don't merge or rebase by default

Git 2.27 has default git pull behavior that we feel is beneficial. The Git 2.27 default is to not merge or rebase by default, unless the user specifies a default behavior. With Git ≥ 2.0, explicitly specify “safe” default behavior for git pull as follows. This setting that linear Git history is maintained unless manually specifying git pull options. Git services such as GitHub allow enforcing linear history.

git config --global pull.ff only

That adds to “~/.gitconfig”

[pull]
  ff = only

If encountering a Git remote that cannot be fast-forwarded, the user can then either git rebase or git merge.

Notes

Git: rebase vs. merge