Git error on commit after merge - fatal: cannot do a partial commit during a merge

I found that adding "-i" to the commit command fixes this problem for me. The -i basically tells it to stage additional files before committing. That is:

git commit -i myfile.php

git commit -am 'Conflicts resolved'

This worked for me. You can try this also.


You can use git commit -i for most cases but in case it doesn't work

You need to do git commit -m "your_merge_message". During a merge conflict you cannot merge one single file so you need to

  1. Stage only the conflicted file ( git add your_file.txt )
  2. git commit -m "your_merge_message"

Tags:

Git

Commit