Cherry-pick allows you to take one or more specific commits from a branch and apply them on top of another branch.
Instead of merging the whole branch, you selectively pick only the commits you need.
Useful in cases like:
Imagine this simple commit history:
main: A -- B -- C
feature: B -- C -- D -- E
If you want only commit D from feature to be applied on main:
main after cherry-pick:
A -- B -- C -- D
Commit D' is a new commit based on D, but applied on main.
Switch to the branch containing the commit and view the log.
git checkout feature
git log