ShareYourGroupShareYourGroupError Explainer

Git: Need to specify how to reconcile divergent branches

A plain-words explanation of this Git message: what it means, the usual causes, and the steps that fix it.

The messagefatal: Need to specify how to reconcile divergent branches.

Make the error yourself

Run with git version 2.56.0.windows.4. This is the smallest example we could find that shows it.

Setup used before these commands (a practice folder with no data)
export GIT_AUTHOR_NAME=Asha GIT_AUTHOR_EMAIL=a@example.com GIT_COMMITTER_NAME=Asha GIT_COMMITTER_EMAIL=a@example.com
git init -q --bare -b main remote.git
git clone -q remote.git one
cd one
echo 1 > f.txt
git add f.txt
git commit -qm first
git push -q origin main
cd ..
git clone -q remote.git two
cd one
echo 2 >> f.txt
git commit -qam second
git push -q origin main
cd ../two
echo 3 > g.txt
git add g.txt
git commit -qm third
cd two

Commands

git pull

Git prints (the real message)

From ./remote
   d53cc1e..ff2d917  main       -> origin/main
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint:   git config pull.rebase false  # merge
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.

Why it happens

Your branch and the server's branch both have new commits that the other lacks: the histories have diverged. To combine them Git can either merge (making a merge commit) or rebase (replaying your commits on top of theirs). Newer Git versions do not choose for you and stop with this message and a hint, to make sure that you pick on purpose. It is not an error in your repository.

How to fix it

  1. Choose once for this pull: git pull --no-rebase (merge), git pull --rebase (rebase) or git pull --ff-only (refuse unless there is nothing of your own).
  2. Make the choice permanent: git config --global pull.rebase false (always merge) or git config --global pull.rebase true (always rebase).
  3. If the merge or rebase finds conflicting lines, fix them, git add the files, and continue (git commit for a merge, git rebase --continue for a rebase).

The corrected version

Commands

git pull --no-rebase --no-edit

Git prints (the corrected version)

Merge made by the 'ort' strategy.
 f.txt | 1 +
 1 file changed, 1 insertion(+)
From ./remote
   b486d81..7cc5e47  main       -> origin/main

How to avoid it

Set pull.rebase once on every computer, so that you never see the message again.

Questions

Which should I choose, merge or rebase?

If you work alone or are unsure, merge is simpler and never rewrites history. Teams often prefer rebase for a straight history; follow the team's habit.

This is an independent guide. It is not connected with Python, Microsoft, Google, GitHub or the Git project. Product names belong to their owners. Examples were run on 13 November 2026 in a practice folder or a blank workbook; your version may word a message slightly differently.