How to Use git cherry-pick to Apply a Specific Commit

git cherry-pick applies the changes from one specific commit onto your current branch, without merging the entire branch it came from.

Published September 20, 2026

git cherry-pick takes the changes introduced by one specific commit from another branch and applies them as a new commit on your current branch, without pulling in any other commits from that branch.

git cherry-pick abc1234

Steps

  1. Find the commit hash you want from another branch, e.g. with git log branch-name
  2. Check out the branch where you want the change applied
  3. Run git cherry-pick <commit-hash> — Git creates a new commit on your current branch with the same changes

How it works

The cherry-picked commit gets a brand-new commit hash on the target branch, since it's technically a different commit object (same diff, different parent/history), even though the content matches.

Things to watch for

  • Cherry-picking a commit that depends on earlier commits not present on your branch can cause conflicts — resolve them the same way as a merge conflict, then git cherry-pick --continue
  • A common use case is backporting a bugfix from main into a release branch without merging all of main's other unreleased changes

FAQ

Does cherry-pick remove the commit from the original branch?

No — it copies the change. The original commit remains exactly where it was on its original branch; a new, separate commit is added to the target branch.

More Git articles