Apply changes from a merge commit relative to a chosen parent.

Section: Cherry-pick Workflows

Cherry-pick a merge commit

bash
bash
git cherry-pick -m 1 <merge_commit_sha>
Explanation

Like revert of a merge, cherry-picking a merge requires selecting the mainline parent.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Cherry-pick Workflows
Cherry-pick one commit
Apply the changes introduced by one commit onto the current branch.
OpenIn sheetbashsame section
Cherry-pick multiple commits
Apply several explicit commits in sequence.
OpenIn sheetbashsame section
Cherry-pick a contiguous range
Apply a range of commits inclusively.
OpenIn sheetbashsame section
Continue cherry-pick after conflicts
Resume a paused cherry-pick sequence.
OpenIn sheetbashsame section
Abort cherry-pick
Cancel the current cherry-pick operation.
OpenIn sheetbashsame section
Start bisect with good and bad revisions
Initialize bisect and mark boundaries.
OpenIn sheetbash1 tag match