Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Devops
  3. Question
Devops

Git Error On Commit After Merge - Fatal: Cannot Do A Partial Commit During A Merge

Asked by Alastair Mcdade Nov 17, 2022 2.8K views 1 answer
Share

About this question

I ran a git pull that ended in conflict. I resolved the conflict and everything is fine now (I used the merge tool also). When I commit the resolved file with  git commit file.php -m "message"  I get the error: fatal: cannot do a partial commit during a merge.


I had the same issue before and using  -a in commit worked perfectly. I think it's not the perfect way because I don't want to commit all changes. I want to commit files separately with separate comments. How can I do that? Why doesn't git allow users to commit files separately after a merge? I could not find a satisfactory answer to this problem.

Your answer

1 Answer

More Devops discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest DevOps Blogs

Guides, tips and career advice on DevOps from JanBask experts.