IntelliJ (2021.3.1 in this case) has a tool – via right-click,
Resolve Conflicts... – which provides a three-pane yours/merged/theirs tool to fix conflicts.
However, I always find it much easier to fix the problems in situ, in the normal IDE edit pane, then flag that the conflicts are fixed.
Having done this though, how do you flag that the problems with the file in question are fixed?
When using IJ in the past with Subversion there was an option to just flag the file as fixed (right-click,
Mark Resolved – I think it was.)
Surely there must be a way to do the same when using git?
This seems like a really simple thing. But I’m now on my third Google attempt, and trawl through the IJ documentation, and nothing.
To be clear, I don’t want to have to use the 3-pane Merge Revisions dialog at all. I want to edit the differences as shown in the regular edit window (as per below) and then flag the file as fixed when done. This used to be possible, at least with svn, though I suspect this might be a IJ version difference rather than specifically about svn vs git. The menu options to to
Mark Resolved the current file just isn’t there any more.
e.g. I want to edit this directly in the IDE …
before <<<<<<< HEAD my changes ======= their changes >>>>>>> master after
And when I’ve edited it to be…
before my changes and their changes after
… I just want to flag in IJ that I’ve fixed the conflict.
git add the file in question. Or use IntelliJ’s
Add to VCS action on the file.
Answered By – michid