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

For a cleaner linear history, consider configuring it to rebase instead. This way, your local commits get replayed on top of the remote ones - no unnecessary merge commits:

git config --global pull.rebase true

This works well if your team agrees to squash-and-merge PRs or prefers tidy commit logs. It also avoids that “Merge branch ‘master’” clutter when you’re constantly syncing up with remote.

But keep in mind that rebase rewrites history, so use with care if you’re already sharing your branch with others.