dev@local: ~/project — git
dev@local~/project$git pull
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
fatal: Need to specify how to reconcile divergent branches.
Diagnostics Translation
Your local branch and the remote tracking branch have both received different commits.
waiting for resolution...
MediumVersion Control System

Reviewed for reference consistency: April 11, 2026

State Confusion

WARNING

Your repository history is in a split or detached state. New commits might be orphaned if not managed carefully.

What To Know

This warning means local and remote history both moved forward on different paths, and Git wants the integration strategy made explicit before continuing.

Where Did It Fail?

Working Tree
Your local files
add
Staging Index
Prepared changes
commit
Local Repo
Commit history
push/fetch
Remote Server
GitHub/GitLab
Git halted to protect the uncommitted files in your active working directory.

Commands That Trigger This

$git pull
Running after committing local work without syncing first
$Attempting to pull after someone else force-pushed to the shared remote branch
Attempting to pull after someone else force-pushed to the shared remote branch

Technical Background

01

This warning was introduced in modern Git versions to prevent unintentional merge commits.

02

Git wants you to explicitly choose a reconciliation strategy: merging creates a new commit joining the histories, while rebasing replays your local commits on top of the remote ones.

Underlying Causes

You made local commits, and someone else pushed different commits to the same branch on the remote server
You rebased a branch that already had commits on the remote
Working from two different computers without syncing in between

Frequently Asked Questions

Merging preserves exact history but adds a merge commit. Rebasing creates a cleaner linear history but rewrites commits. Both are valid, depending on your team's workflow.

Related Git States