September 2009
Beginner
942 pages
85h 34m
English
cherry-pick
git cherry-pick commitTake the changes from an individual commit (usually one from another branch) and apply it to the current branch. Note that unlike git merge, git cherry-pick applies only a single change, not all the history leading up to that change.
The newly created commit is completely independent of the original, although it has the same commit message by default. git cherry-pick commit is the rough equivalent of git show commit | patch -p1
| -e, --edit |
| -x (extend commit message) |
| -m parent-number |
| -n, --no-commit |
| -s, --signoff |
To cherry-pick commit 1a48191 onto the current branch and edit the commit message:
$ git cherry-pick -e 1a48191
Finished one cherry-pick.