Git · Branches and integration

git cherry-pick

Applies a single commit from another branch onto the current one.

Syntax
git cherry-pick <commit>

Example

Example
git cherry-pick 1a2b3c4

More in this group

git branch git checkout git merge git merge --abort git switch git worktree Merge conflict markers

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course