Git Conflicts

When a merge, rebase, or cherry-pick produces conflicts, grüt switches to a dedicated conflict resolution panel — showing both sides, highlighting differences, and letting you resolve each conflict with a single keypress.

grüt
Conflict resolution panel showing ours and theirs side by side
Dedicated conflict resolution panel

Conflict Detection

grüt automatically detects conflicts after any git operation that can produce them (merge, rebase, cherry-pick, stash pop). Conflicting files appear in the status panel with a conflict marker, and grüt displays a notification with the number of files in conflict.

Conflict Panel

Select a conflicting file to open the conflict resolution view. The panel shows a two-column layout:

  • Left (Ours) — the version from your current branch
  • Right (Theirs) — the incoming version from the branch being merged

Conflicting regions are highlighted with distinct colors. Lines that differ between the two sides are emphasized so you can quickly identify what changed.

Resolution Options

For each conflict region, choose a resolution:

KeyAction
oAccept ours — keep the current branch version
tAccept theirs — take the incoming version
bAccept both — include both versions sequentially
eManual edit — open in your configured editor

After choosing a resolution, the conflict marker is removed from that region and the resolved content is shown inline. You can change your decision by pressing a different resolution key before moving on.

Navigation

KeyAction
jMove to next conflict region
kMove to previous conflict region
nJump to next conflicting file
NJump to previous conflicting file

Completing Resolution

Once all conflicts in a file are resolved, the file's status changes from to (staged). When every conflicting file has been resolved:

  1. grüt stages all resolved files automatically
  2. A prompt asks you to continue the interrupted operation
  3. Press Enter to confirm — grüt runs the appropriate git merge --continue, git rebase --continue, or git cherry-pick --continue

To abort the operation instead, press q and confirm when prompted. This runs the corresponding --abort command and restores your branch to its pre-operation state.

Next Steps