Resolve Simple Conflicts

Settling, in one action, only the hunks that have one possible answer.

Not every hunk in a conflicted file is a real conflict. Two kinds have exactly one sensible answer:

  • Both sides made the same change. You and they both fixed the same typo. The result is that change.
  • Only one side changed anything. Measured against the common ancestor, one version is the ancestor and the other is a change. The result is the change.

Resolve Simple Conflicts settles those, in one action, across the file. It is in the conflict editor’s toolbar, behind the button next to Mark Resolved, and it is switched off when there is nothing in the file it could settle.

What it leaves alone

Everything else. Anything where both sides changed something and the changes differ is left exactly as it was, for you to decide in the three-pane editor.

That restraint is the feature. A tool that resolved the ambiguous hunks too would be guessing, and its guesses would be indistinguishable from your decisions once the file was saved. This one only does the parts where there is nothing to decide, which means what is left on screen afterwards is exactly the set of things that need you.

When to use it

On a file with many hunks after a long-lived branch has drifted. How much it settles depends entirely on the file — but whatever it settles is work you would have done by hand and agreed with, and what is left afterwards is exactly the set of hunks that need you.