What does git cherry-pick do?
cherry-pick copies the changes of one chosen commit onto your current branch as a new commit. It lets you take a single fix without merging the whole branch it lives on.
Explain it simply
A friend's notes contain one useful formula among forty pages. You copy only that formula into your notes.
You checkout the branch that needs the change and run git cherry-pick <hash>. Git applies that commit's diff and creates a new commit with a new hash, the same message and author, and your name as committer. The two commits are copies, not links. It is ideal for backporting a bug fix to a release branch.
Example
git switch release/2.1
git cherry-pick 4b5c6d7
# [release/2.1 a9f8e7d] Fix crash on empty cart
git log --oneline -1What to say in the interview
"git cherry-pick applies the changes from a specific commit as a new commit on my current branch. I use it for backporting a hotfix to a release branch. The copy has a different hash and the commits are not linked."