Apply One Commit With git cherry-pick
Replay a specific commit onto the current branch.
Run git cherry-pick <sha> to apply that commit's changes here.
01Command
Command
$ git cherry-pick <commit-sha>02What it does
cherry-pick is the precise way to backport a bug fix or lift one change from a feature branch without merging everything else. It accepts ranges and -n to stage without committing, which makes it a building block in release automation.
03Risk
!Warning: The same change may conflict or be applied twice if the branches later merge; track backports explicitly.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- git-cherry-pick documentationEvidence: Documents git cherry-pick, which applies the change from an existing commit.
Last verified: 2026-10-13 · Category: Developer