Skip to content
Download

Merge, cherry-pick and revert

Commitline merges, cherry-picks and reverts with your own Git, and tells you before you start whether it will conflict.

Merge a commit into your branch

  1. In History, choose a commit that a branch points at.
  2. In the Commit view, choose Merge.

Git merges that commit into the branch you're on, and names it by its id, such as Merging debd2c6 into main and the message Merge commit 'debd2c6…'.
To merge a branch by its name, drag its chip onto yours; see [Drag a branch onto another](#drag-a-branch-onto-another).
Under the button, Commitline says beforehand what will happen: Merge applies cleanly., or that it would conflict, naming the files.

Drag a branch onto another

In History, drag a branch's chip onto another branch's chip.
Commitline checks for conflicts without touching your files, says No conflicts predicted, Already merged, or Conflicts predicted in 2 files, and offers:

ChoiceWhenWhat it does
Merge feature into mainYou're on mainMerges the dragged branch into yours.
Switch to main and merge featuremain is another of your branchesAsks Switch and merge?, then switches to main and merges. You stay on main afterwards.
Rebase feature onto mainYou're on featureOpens an interactive rebase of your branch onto main.
Open a pull request into mainThe branch is pushed to GitHub or Azure DevOpsOpens the host's new pull request page in your browser.

Switch and merge needs a clean folder: commit or stash your changes first.
Press Escape, or click elsewhere, to close the choices.

fix/seed-names dropped on main in History: Conflicts predicted in one file, src/seeds.ts, and the choices Merge, Rebase and Open a pull requestfix/seed-names dropped on main in History: Conflicts predicted in one file, src/seeds.ts, and the choices Merge, Rebase and Open a pull request

Cherry-pick a commit

Choose a commit in History, then Cherry-pick in the Commit view.
Git applies that commit's change to your branch as a new commit.
When the change is already on your branch, Commitline says so, and nothing changes.

Revert a commit

Choose a commit in History, then Revert in the Commit view.
Git makes a new commit on your branch that undoes that commit's change, and history keeps both.

When it conflicts

A merge, cherry-pick or revert that conflicts stops, and the Git view says so, such as Merging feature into main, with:

  • Resolve conflicts, which opens the Conflicts screen; see Resolve conflicts;
  • Abort merge (or Abort cherry-pick, Abort revert), which puts everything back as it was before you started.

The Git view during a merge that stopped: Resolve conflicts and Abort merge, and src/seeds.ts under ConflictsThe Git view during a merge that stopped: Resolve conflicts and Abort merge, and src/seeds.ts under Conflicts

Once every conflict is resolved, choose Commit the merge (or Commit the cherry-pick, Commit the revert) to finish.
Commitline doesn't start another merge, cherry-pick, revert or rebase while one is in progress.

Take it back

After a merge, cherry-pick or revert finishes, Ctrl+Z (⌘Z on a Mac) moves your branch back where it was.
See Undo.

Cherry-pick and revert work on one commit at a time.
Merge, cherry-pick and revert predictions need Git 2.40 or later.