Skip to main content
Merge, rebase, cherry-pick, revert, and reset are all run by right-clicking a commit in the commit graph.
The action menu opened by right-clicking the HEAD commit. The create/read, cherry-pick, edit history, dangerous, and ref submenu groups are separated by dividers, and only the Reset item is shown in red

Reading the menu

The menu is organized into five groups, and items whose conditions aren’t met, along with empty groups, disappear together with their divider. On a commit with branch and tag badges, a submenu for each ref is appended at the very end.
The only items shown in red are Reset and the ref submenu’s Delete. The complete menu rules are laid out in Interface tour.

Merge

Merge into the current branch with the default, no-fast-forward, or squash strategy.

Rebase

Rebase onto a branch or commit, and reorder or squash commits interactively.

Cherry-pick & revert

Apply a commit onto the current branch, or undo one with a new commit.

Reset

Move the current branch back to a commit in soft, mixed, or hard mode.

When a conflict happens

When a conflict happens, the operation stops and a banner appears in the Working copy panel. In the banner, you can check the kind of operation in progress and how many conflicts remain, and click Continue / Abort; during a rebase, Skip also appears.
The banner at the top of the Working copy panel while a rebase is in progress, 'Rebasing · 1 conflict' with Abort and Skip buttons, and the Continue button disabled because a conflict remains
If conflicts remain, the Continue button is disabled. It becomes active once you resolve and stage all conflicted files. Resolving merge conflicts covers how to resolve them.
If a conflict occurs during a Squash merge, no banner appears. --squash leaves no in-progress state to continue or abort. Resolve the conflicts, stage them, and finish with a regular commit. To undo it, use Reset.

A warning about rewriting history

Rebase and Hard reset rewrite the commit history. If a commit that was already pushed is included in the target, a notice appears after the action telling you a force-push is needed. Use the Force (—force-with-lease) toggle in the Push dialog. On a shared branch, rewrite history only when the team has agreed to it.