What does `git cherry-pick` do?
BeginnerConceptMerge, rebase and cherry-pick
Answer
It applies the change introduced by one or more existing commits onto the current branch as new commits with new IDs. It is the tool for back-porting a fix to a release branch. For merge commits you must choose the mainline parent with -m.
git cherry-pick 3fa9c21
git cherry-pick -x A^..B # range, records origin in message
git cherry-pick -m 1 <merge-sha>
More on Merge, rebase and cherry-pick
What is the difference between a fast-forward merge and a merge commit?BeginnerHow does a three-way merge work?IntermediateWhat does `git rebase` actually do?IntermediateMerge versus rebase: how do you decide?IntermediateWhat are squash merge, merge commit and rebase-and-merge on GitHub?IntermediateWhy does a squash-merged branch show as unmerged to `git branch --merged`?Intermediate