Git cannot-do-a-partial-commit-during-a-merge Committing selected paths was refused because a merge must be recorded as one unit.
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
A merge commit has one job: record the exact intersection of two histories. If paths could be committed selectively, the recorded merge would describe a tree that neither parent branch produced, and the deferred half of the index would be stranded without a merge commit to belong to.
The refusal fires before conflict resolution is even considered — the same error appears with a clean tree and with unmerged files. Committing the whole merge (`git commit` with no paths) or aborting the merge are the two exits Git leaves open.
Underlying Causes
Frequently Asked Questions
Outside a merge, committing one path defers the rest of the index safely; inside a merge, the deferred half could never be committed later without inventing a second merge commit.
Yes — the full merge commit comes first, and ordinary path-scoped commits follow as usual once it exists.
Related Git States
Git paused the merge because it cannot automatically resolve overlapping changes.
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.