简体   繁体   中英

Trouble merging master to my feature branch using Intellij/Git

My procedure:

  1. In my feature branch I commit and push all my changes.
  2. Using Intellij, I select origin/master -> merge into current.
  3. The conflicting files are presented to me. I solve the conflicts in all files.

I get the following error:

Couldn't check the working tree for unmerged files because of an error. Committing is not possible because you have unmerged files.

What am I missing?

Thank you for your help.

Although you may have resolved the conflicts in the files after the merge, Git does not actually know this. Instead, it still sees the files in conflict. To resolve this, you need to git add each file which was in conflict to mark it as resolved.

If you right click each file in conflict in IntelliJ, there should be a menu item for adding to version control. You may also use the Project menu on the top to do this.

Once you have added each file, Git should report that all conflicts have been resolved, and you may commit the merge.

For my IntelliJ, if I resolve conflicts in it, it does add the files automatically. For your case, go to the console/terminal run git status to check if all files are green, if not do git add .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM