Skip to content

Conflict editor

When a merge / rebase / cherry-pick leaves a file in a conflicted state, gitoui detects the unmerged status and offers the conflict editor as the a action on that file in the Uncommitted view.

The editor splits the file into:

  • Hunks, each contiguous <<<<<<< / ======= / >>>>>>> block from git’s conflict markers.
  • Surrounding context, non-conflicting lines stay shown so you can see the resolution in place.

Each hunk shows OURS (your side) and THEIRS (incoming side) side by side (or stacked, depending on ui.common.conflict_view).

Conflict editor, OURS left / THEIRS right, markers stripped, picker chip between panes

PressAction
oPick OURS for the focused hunk (your branch’s version).
tPick THEIRS (the incoming version).
bKeep BOTH, OURS lines first, then THEIRS lines.
Shift+BKeep BOTH, THEIRS lines first, then OURS lines.
n / Next hunk.
p / Previous hunk.
↑↓Scroll the file viewport without moving between hunks.
EnterWrite the resolution back to the file and git add it.
EscCancel, file stays conflicted, no writes.
  1. From the Uncommitted view, focus a file with the ⚠ N conflict(s) badge and press a → editor opens on the first hunk.
  2. Pick an action for each hunk (o / t / b / Shift+B).
  3. n / p walk between hunks; the picker chip shows your current choice.
  4. Enter writes the resolved file and runs git add <file> so it leaves the Unmerged list.
  5. Continue your rebase / commit your merge from the Uncommitted view.

Conflict resolution, o OURS, t THEIRS, b both, ←/→ walk between hunks, Enter to save

ui.common.conflict_view:

OURS on the left, THEIRS on the right, picker chip floats between.

[ui.common]
conflict_view = "two-pane"

Both layouts use the same key bindings.