Skip to content
Download

DOCS / GIT

Resolve conflicts

When a merge, rebase, cherry-pick, or revert hits conflicting changes, Birch opens the Resolve Conflicts window: the conflicted files on the left, read-only Ours and Theirs panes flanking an editable Result, and buttons to take either side — for the whole file or hunk by hunk. When you want a starting point instead of hand-merging, an AI suggestion can propose the whole merged file.

  • Automatically, when a merge, rebase (including an interactive rebase), cherry-pick, or revert you started in Birch reports conflicts. The status line notes the conflict and the resolver opens on the affected worktree.
  • Automatically, when you start one of those operations while another operation is already in progress in that worktree.
  • From the in-progress banner. While a merge, rebase, interactive rebase, cherry-pick, or revert is unfinished, the worktree’s Git view shows a warning banner — “<Operation> in progress — <N> conflicted file(s)” — with a Resolve conflicts… button that reopens the resolver at any time.

Conflicted files are also flagged with a ⚡ marker in the Changes tab, so you can see at a glance which files are blocked.

The window header names the operation in progress and the currently selected file. Down the left is the Conflicted files list; each row carries a badge for the conflict kind. Selecting a file fills the three panes:

PaneContents
OursYour side of the conflict (read-only)
Result (editable)The merged file you are building — edit it freely
TheirsThe incoming side (read-only)

The toolbar above the panes acts on the selected file as a unit:

  • Use ours (whole file) / Use theirs (whole file) — replace the result with one side.
  • Use both — concatenate both sides (text files only).
  • AI suggest — ask Birch’s AI to propose a merged version (text files only; see below).
  • Mark resolved — accept the current Result pane: Birch writes it to disk and stages the file (the equivalent of git add), removing it from the conflicted list.

For text files with conflict markers, a second toolbar row navigates conflict hunks with ◀ ▶ — or F8 (next) and Shift+F8 (previous) from the keyboard — and resolves the current hunk with Ours, Theirs, or Both. A label next to the buttons tracks which choice each hunk received. See keyboard shortcuts for the full shortcut table.

You can mix approaches: take a side per hunk, then hand-edit the Result pane before pressing Mark resolved.

AI suggest is an Anthropic API feature: it needs the ANTHROPIC_API_KEY environment variable and asks a Claude Sonnet model for a merged version of the file, which lands in the Result pane. Treat it as a draft — review and edit it before Mark resolved, exactly as you would a teammate’s suggestion. The button is disabled when no API key is configured.

  • Binary conflict — there is nothing to merge line by line. The panes are replaced by a notice: pick one side with the whole-file toolbar buttons, then press Mark resolved.
  • Deletion conflict — one side deleted the file while the other modified it. Pick a side, then press Mark resolved. To finalize a deletion on the file system, abort and use the command line for now.

The footer offers three exits:

  • Continue — once every file is marked resolved, finishes the operation (git’s merge --continue, rebase --continue, cherry-pick --continue, or revert --continue, matching whatever is in progress).
  • Abort — cancels the whole operation and returns the worktree to its state before it started.
  • Close — dismisses the window without touching the operation. The conflict markers stay in the files on disk, so you can resolve them in an external editor instead and finish from the command line — or come back later via the in-progress banner’s Resolve conflicts… button.