🔀Cherry-Pick
Also known as Cherry Pick
One saved change, picked from a branch and added to yours.
Think of it like
Think of it like taking one cherry from a bowl. You get the one you want, not the whole bowl.
Example
Why it matters
Definition
Example code
console
$ git cherry-pick ddc2437
[main 68ba79c] Fix typo
1 file changed, 1 insertion(+)Common mistake
Key takeaways
- 1Just one commit. Pick the change you need.
- 2By its code. Name the commit you want.
- 3A new copy. The copy gets its own code.