IT lexicon › Programming › git cherry-pick

git cherry-pick

Programming På svenska → Updated: 2026-05-24

Copies a single commit from one branch to another. Classic use: backport a bugfix from main into a release branch.

git cherry-pick <sha> creates a new commit on the current branch with the same change. Conflicts handled like merge. Variants: -x adds a "cherry picked from" note, --no-commit stages without committing, ranges with A..B. Risk: makes git log show "the same" commit on multiple branches with different SHAs.

← Back to the lexicon