Skip to content

Cherry-pick

← All terms · Git fundamentals

The act of selecting a single, specific commit from one branch and applying it independently to another branch.

What it is

Cherry-picking takes the exact changes introduced in one commit and duplicates them onto your current branch. Instead of merging an entire branch's history, it surgically extracts just the work from the specific commit you need.

When you would use it

You reach for cherry-pick when someone else has written a helpful commit on a different branch, and you need just that code without merging the rest of their unfinished work.

Common operations

  • Pulling a specific bug fix from an experimental branch into the main branch.
  • Backporting a security patch to an older release version.

Related terms

Where this is taught

No learning path uses this term yet. Browse the Learning Atlas for guided sequences through related ideas.