![Forrest logo](/images/logo.png)
git-cherry-pick:tldr:faabd
git-cherry-pick: Apply multiple (non-sequential) commits to the current branch.
$ git cherry-pick ${commit_1} ${commit_2}
try on your machine
The command git cherry-pick
is used to apply the changes from one or more specified commits to the current branch.
In the provided command git cherry-pick ${commit_1} ${commit_2}
, ${commit_1}
and ${commit_2}
refer to the specific commits that you want to cherry-pick.
By executing this command, Git will go through the specified commits, one by one, and apply their changes directly to your current branch. This can be useful when you want to selectively apply specific commits from one branch to another.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.