git cherry-pick <commit...>

Apply the changes introduced by some existing commits

Arguments

NameDescription
commitCommits to cherry-pick

Options

NameDescription
--continueContinue the operation in progress using the information in .git/sequencer
--skipSkip the current commit and continue with the rest of the sequence
--quitForget about the current operation in progress
--abortCancel the operation and return to the pre-sequence state
-e, --editWith this option, git cherry-pick will let you edit the commit message prior to committing
--cleanup <mode>This option determines how the commit message will be cleaned up before being passed on to the commit machinery
-xWhen recording the commit, append a line that says "(cherry picked from commit ...)" to the original commit message in order to indicate which commit this change was cherry-picked from
-m, --mainline <parent-number>Specifies the parent number (starting from 1) of the mainline and allows cherry-pick to replay the change relative to the specified parent
-n, --no-commitApplies changes necessary to cherry-pick each named commit to your working tree and the index without making any commit
-s, --signoffAdd a Signed-off-by trailer at the end of the commit message
-S, --gpg-sign [keyid]GPG-sign commits
--no-gpg-signUseful to countermand both commit.gpgSign configuration variable, and earlier --gpg-sign
--ffIf the current HEAD is the same as the parent of the cherry-pick'ed commit, the a fast forward to this commit will be performed
--allow-emptyAllow empty commits to be preserved automatically in a cherry-pick
--allow-empty-messageAllow commits with empty messages to be cherry picked
--keep-redundant-commitsCreates an empty commit object. Implies --allow-empty
--strategy <strategy>Use the given merge strategy. Should only be used once
-X, --strategy-option <option>Pass the merge strategy-specific option through to the merge strategy
--rerere-autoupdateAllow the rerere mechanism to update the index with the result of auto-conflict resolution if possible
--no-rerere-autoupdateDo not allow the rerere mechanism to update the index with the result of auto-conflict resolution if possible