How can I fix this Git warning: "you have divergent branches and need to specify how to reconcile them"?

When I run git pull origin master, I get the following warning:

warning: Pulling without specifying how to reconcile divergent branches is discouraged.

You can squelch this message by running one of the following:

git config pull.rebase false  # merge (default)
git config pull.rebase true   # rebase
git config pull.ff only       # fast-forward only

The pull still completes successfully, but I’m unsure if I should be doing something differently.

From what I understand, this means you have divergent branches and need to specify how to reconcile them, either through merge, rebase, or fast-forward.

Which option is safest for everyday use when collaborating with others?

Should I set a global default or decide per project? Would appreciate a bit of clarity here.

If your team prefers the classic Git workflow where merges are visible in history, then you might want to explicitly set pull to always merge.

That way, even if someone else pushed commits, you’ll get a merge commit showing that integration. To avoid the warning every time:

git config --global pull.rebase false

This is especially useful in teams where multiple people might touch the same branches, and you want a visible log of who merged what and when.

Just be aware it can make the history a little messier over time.