fatal: cannot do a partial commit during a merge Git Origin: Build & delivery OSI layer 7 · Application Last updated 25 Nov 2026

fatal: cannot do a partial commit during a merge.

You tried to commit selected files in the middle of a merge.

Exact message you may see cannot do a partial commit during a mergecannot do a partial commit during a cherry-pickfatal: cannot do a partial commit during a merge.
Seen on: Git

Meaning

Finish the merge with a full commit (git add -A && git commit) or abort it with git merge --abort.

Common causes

  • git commit file while merging
  • Merge not finished
  • -o/paths used

⚡ Quick fix

  1. git add . then git commit
  2. git merge --abort
  3. Avoid path arguments during merges

Detailed fix by platform

Git

  1. bash
    git add -A
    git commit

How to diagnose

  1. Merge — in progress?
  2. Paths — given?
  3. Abort — fine?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):

cherry-pick: The previous cherry-pick is now empty — The previous cherry-pick is now empty, possibly due to conflict resolution. (Git)cherry-pick: The prev…CONFLICT — Git: CONFLICT (content): Merge conflict in file — Automatic merge failed (Git)CONFLICTCONFLICT during cherry-pick — error: could not apply a1b2c3d... Fix login bug / hint: After resolving the conflicts, mark them with git add/rm, then run git cherry-pick --continue (Git)CONFLICT during cherr…Core Data: constraint violation (NSConstraintConflict) — Error Domain=NSCocoaErrorDomain Code=133021 "Could not merge changes." NSConstraintConflict (iOS)Core Data: constraint…Duplicate resources / Resource compilation failed — Execution failed for task ':app:mergeDebugResources'. > A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable (Android)Duplicate resources /…error: Entry 'file' not uptodate. Cannot merge. — error: Entry 'app.js' not uptodate. Cannot merge. fatal: Merge with strategy recursive failed. (Git)error: Entry 'file' n…error: pathspec 'text' did not match any file(s) known to git (unquoted -m message) — error: pathspec 'fix' did not match any file(s) known to git error: pathspec 'login' did not match any file(s) known to git (Git)error: pathspec 'text…error: The branch is not fully merged — error: The branch 'feature/x' is not fully merged. If you are sure you want to delete it, run 'git branch -D feature/x'. (Git)error: The branch is …fatal: ca…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.