Merge, rebase and resolve conflicts
此内容尚不支持你的语言。
Merging, rebasing and cherry-picking start from the branch popup or the Git log. When Git stops on a conflict, the merge view opens by itself with your side, the result and their side. Merge, rebase, cherry-pick and the three-pane conflict view: Works.
Merge a branch
Section titled “Merge a branch”- Open the branch popup (click the branch in the main toolbar).
- Select the branch to merge and press ⌘↩, or choose Merge ‘feature’ into ‘main’ from its submenu (→).
The result is “up to date”, a fast-forward, or a merge commit with the message
Merge branch 'feature' (plus into <branch> when the current branch is not main or master).
If Git stops on conflicts, the merge view opens; see Resolve conflicts. Until
the merge is finished, the branch widget says so:

ferris-idea drive screenshot · v1.6.0 release build, 2026-12-04--no-ff, squash and octopus merges are not offered; run them in the terminal if you need them.
Rebase a branch
Section titled “Rebase a branch”- Onto another branch: in the branch popup, select the target and press ⌥↩, or choose Rebase ‘main’ onto ‘…’. Checkout and Rebase onto ‘main’ switches to a branch and rebases it in one step.
- While a rebase waits for you (after a conflict), the branch widget says “Rebasing …” and the popup offers Continue Rebase, Abort Rebase and Skip Commit. The same actions are in the Git menu.
Rework commits with an interactive rebase
Section titled “Rework commits with an interactive rebase”- In the Git log, select the oldest commit to change and press ⌥I (Interactively Rebase from Here…), or choose Git › Interactively Rebase… for the commits since the upstream.
- The dialog Interactive Rebase onto … lists the commits. For each, choose an action with a key: P pick, R reword, S squash, F fixup, D drop. Move a commit with ⌥↑ and ⌥↓.
- The right side shows the selected commit’s files and diff (F7 through the changes).
- Press ↩ to start, Esc to cancel.
Local changes are stashed around the rebase and come back afterwards. A range that contains a merge
commit, or a branch without an upstream (for the menu entry), is refused. edit and exec lines
and --rebase-merges are not available.
For a single commit, the Git log’s context menu has shortcuts: Edit Commit Message… (F2), Fixup…, Squash Into… and Drop Commit.
Cherry-pick a commit
Section titled “Cherry-pick a commit”In the Git log, select a commit of another branch and press ⌥↩ or choose Cherry-Pick. The change is applied to the current branch as a new commit. One commit at a time; a conflict stops it, and the branch widget says “Cherry-picking” until you continue, skip or abort.
Resolve conflicts
Section titled “Resolve conflicts”The merge view opens by itself when a merge, rebase, cherry-pick, pull, unstash or Continue stops on a conflict. Git › Resolve Conflicts… opens it again.
The view has three columns: Yours (HEAD), Result and Theirs. During a rebase they read “Yours (feature)” and “Theirs (rebase target)”, because Git applies your commits onto the target. Changes that do not conflict are already in the result when the file opens.
- Click Resolve Simple first. It resolves the conflicts whose changes do not overlap, word by word.
- For each remaining conflict, take a side with the » or « arrow, or ignore it with ×. Accept Left and Accept Right in the header take one side for the whole file.
- Edit the Result column freely; it has undo.
- F7 and ⇧F7 move between the changes.
- Click Apply once no conflict is open. The result is written and added to the index. On the last file, Git continues the merge, rebase or cherry-pick.
If the result still contains conflict markers, Apply asks Apply Anyway or Keep Resolving. Closing with unapplied work asks Discard and Close or Keep Resolving. Binary files, files that are not UTF-8, and a file deleted on one side and changed on the other are resolved by taking a whole side.
When it does not work
Section titled “When it does not work”- Apply says “1 conflict(s) still open”: take a side or ignore the remaining conflicts first.
- The interactive rebase is refused: the range contains a merge commit, or the branch has no upstream.
- A revert stopped: a conflicting Revert Commit from the log is aborted, leaving your branch as it was. Revert by hand in the terminal and resolve there.
| Action | Shortcut |
|---|---|
| Apply left sideDiff.ApplyLeftSide | ⌃⌘→CtrlAltR |
| Apply right sideDiff.ApplyRightSide | ⌃⌘←CtrlAltA |
| Next diffNextDiff | F7F7 |
| Previous diffPreviousDiff | ⇧F7ShiftF7 |
The keys in the popup and the log (⌘↩ merge, ⌥↩ rebase or cherry-pick, ⌥I interactive rebase) belong to those views and are not in the keymap.
For agents
Section titled “For agents”git_conflicts lists the conflicted files with their sides. Merging, rebasing, cherry-picking and
resolving need the right vcs-write. git_merge refuses up front when the merge would conflict,
and names the files; git_resolve_conflict takes a side or a resolved text for one file and adds
it.
git_cherry_pickCherry-pick: apply the change of one commit onto the current branch as a new commit.git_conflictsFiles with an unresolved merge conflict (after a merge, rebase, cherry-pick or stash that stopped) with their base, ours and theirs text from the index (ours is HEAD, in a rebase the target), and the automatic three-way merge with its open conflicts, as the merge view shows them.git_mergeMerge a branch or revision into the current branch: up-to-date, fast-forward or a merge commit; refuses (listing paths) on merge conflicts or local changes in the way.git_rebaseRebase: replay the current branch's own commits onto another branch or revision, orcontinue/aborta stopped rebase, cherry-pick or merge (after resolving and staging the conflicts), orskipthe commit a rebase or cherry-pick stopped on; finishing brings back changes a smart checkout or merge put aside.git_resolve_conflictResolve the merge conflict of one file, then mark it resolved (git add):takeours, theirs, base or simple (word-by-word merge) for every conflict, a giventext, or per-conflictchoices.
No tool matches. Try fewer words, or .