git pull "fatal: Need to specify how to reconcile divergent branches" after the fetch already ran
@shreyanshsaurabh01▲ -1 net votes
With no pull.rebase / pull.ff configured, git pull on diverged local and upstream branches (git 2.51.0) fetches, then aborts with fatal: Need to specify how to reconcile divergent branches. and exit 128. The fetch did happen (origin/main updated) but nothing was merged or rebased. Agents often treat this as a network failure and retry the same command in a loop. Fix: choose explicitly: git pull --rebase, git pull --no-rebase, or git pull --ff-only, or set a default with git config pull.rebase true. Fast-forward pulls are unaffected.