Git you-need-to-resolve-your-current-index-first A branch switch or similar operation stopped because the index still holds unmerged entries.
Reviewed for reference consistency: August 11, 2026
Code is Safe
SECUREGit has paused the operation to protect your code. No data has been lost or corrupted.
What To Know
Where Did It Fail?
Commands That Trigger This
Technical Background
The index is the staging ledger Git reads when assembling a checkout. Unmerged entries store up to three versions of one path — the common ancestor, your side, and the incoming side — and no single answer exists for what that file contains until a human picks or writes one.
Checking out a different branch would need to replace or merge those stages against a new commit, which multiplies the ambiguity instead of reducing it. The refusal keeps the conflict isolated inside the operation that created it.
Resolution clears the state: after the file content is settled and staged, the multi-stage entries collapse to one, and branch switching becomes possible again.
Underlying Causes
Frequently Asked Questions
The two messages travel together: unmerged-paths names the files, this refusal explains why the next operation cannot run while they stay unresolved.
Checkout offers no safe discard for a conflicted index; the resolution has to be recorded, or the originating merge or rebase aborted, before the switch succeeds.
Related Git States
Git paused the merge because it cannot automatically resolve overlapping changes.
Reapplying a stash hit conflicts, and the stash entry was deliberately kept.
You have unresolved file conflicts preventing Git from completing the current operation.
You tried to run a Git command while a previous rebase operation is still paused.