João Matos
João Matos

Reputation: 6950

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.

Upvotes: 1

Views: 2992

Answers (2)

C Han
C Han

Reputation: 140

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 .

Upvotes: 1

Tim Biegeleisen
Tim Biegeleisen

Reputation: 521083

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.

Upvotes: 1

Related Questions