Show Git conflicts in IntelliJ

Viewed 774

I use IntelliJ as an IDE and the terminal on Mac to do Github commands. I did a git rebase -i origin/main and there were some conflicts and an error saying:

error: could not apply 7d4bdfs7...
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".

How can I display those conflicts in IntelliJ so that I can merge them manually?

2 Answers

From IntelliJ Resolve conflicts, you should have:

If you click Close in this dialog, or call a Git operation that leads to a merge conflict from command line, a Merge Conflicts node will appear in the Local Changes view with a link to resolve them:

https://resources.jetbrains.com/help/img/idea/2021.2/git_merge_conflicts_node.png

From there, clicking on one of those entries give you the window to resolve the merge conflict:

https://resources.jetbrains.com/help/img/idea/2021.2/conflict_resolution_tool_legend.png

From the discussion, the OP confirms:

It took some time for IntelliJ to show the merge conflicts.
I didn't wait long enough the last time, that's why it was empty.

You can install git gui. After that, to see changes or conflicts, just run command git gui, it will show all the changed/uncommited files in the GUI based view.

Related