dev@local: ~/project — git
dev@local~/project$git commit
error: unmerged paths
Diagnostics Translation
You have unresolved file conflicts preventing Git from completing the current operation.
waiting for resolution...
LowVersion Control System

Reviewed for reference consistency: April 11, 2026

Code is Safe

SECURE

Git has paused the operation to protect your code. No data has been lost or corrupted.

What To Know

This state means the repository is still carrying unresolved conflict entries in the index, so Git is blocking normal follow-up actions.

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
The operation was blocked at the staging area. Git cannot prepare or finalize the commit.

Commands That Trigger This

$git commit
Running immediately after a conflict without adding the resolved files
$git checkout <branch>
Trying to switch branches with while the working tree is still in a merging state

Technical Background

01

This message is a direct consequence of a previous operation (like a pull or merge) failing to complete.

02

It acts as a safeguard to prevent half-merged, broken code from being permanently recorded into the repository history.

Underlying Causes

Attempting to commit while conflict markers still exist in tracked files
Running a new merge or checkout before resolving an existing merge conflict
Failing to stage the file with `git add` after manual resolution

Frequently Asked Questions

Git reads the index. If a file has multiple stages recorded (base, local, remote) instead of a single resolved version, Git considers it unmerged.

Related Git States