Choose how git pull handles divergent branches
Set a deliberate merge, rebase, or fast-forward-only policy and inspect configuration precedence instead of merely hiding the warning.
The message about reconciling divergent branches asks you to choose how git pull should integrate local and remote history. Depending on Git's version and configuration, it can be a warning or a fatal refusal to continue. Select the intended behavior instead of assuming one global setting permanently removes every related diagnostic.
Understand the choices
| Policy | Result |
|---|---|
| Merge | Preserve both lines of ancestry; create a merge commit when needed |
| Rebase | Replay the relevant local commits on the updated base, changing commit IDs |
| Fast-forward only | Move the branch when possible; stop if integration would require reconciling divergence |
Rebase is useful for unpublished local work, but rewriting already shared commits needs coordination. Merge can fast-forward when no merge commit is necessary. Fast-forward-only is a useful stopping rule, not an automatic resolution of divergent work.
Choose for one pull
git pull --rebase
git pull --no-rebase
git pull --ff-only
These are alternatives, not a sequence. Explicit command-line choices can override configured defaults: in recent Git, --rebase or --no-rebase can override a configured pull.ff=only. By contrast, an explicit command-line --ff-only remains a fast-forward constraint. Inspect both the command and configuration when behavior differs from your expectation. git pull --no-rebase --ff explicitly requests merge integration with fast-forwards allowed.
Save a repository policy
# Choose the relevant setting for this repository:
git config --local pull.rebase false
# Alternative rebase policy:
git config --local pull.rebase true
# Alternative fast-forward-only constraint:
git config --local pull.ff only
Do not run all three expecting them to cancel one another cleanly: pull.rebase and pull.ff are separate settings. Inspect existing values and remove or replace conflicting settings deliberately.
git config --show-origin --get-all pull.rebase
git config --show-origin --get-all pull.ff
git config --show-origin --get-regexp '^branch\..*\.rebase$'
No matching value may produce no output and a nonzero exit status. Branch-specific rebase settings, repository configuration, command-line options, and global defaults can interact.
Scope and team conventions
--global makes a setting a user-level default across repositories, while local settings can override it. A local .git/config policy is not automatically distributed to every clone, so document the team's workflow and configure CI separately.
The warning became prominent with Git 2.27, but later releases have changed defaults and diagnostics. Use your installed version's documentation rather than relying on the exact text of an old tutorial. The current manual describes fast-forward-only as the default when no reconciliation method is supplied.
Teams may combine local rebasing with merge or squash operations in code review. The important point is to agree on which history is shared and which may be rewritten. After divergence is detected, fetch, inspect the graph, and choose the appropriate operation; hiding the message alone does not reconcile anything.
See git-pull and Git configuration precedence.
Contact us
Join the community
to join the community
Try Guance
Start online and pay only for what you use.
Get startedChoose a Guance plan