When cherry-pick is the right tool
Cherry-pick shines for targeted moves:
- Applying a bug fix to a release branch that never had it.
- Pulling a single great commit out of a messy feature branch.
- Rearranging the order of a few commits.
git cherry-pick <hash>
Remember it copies the change, not the commit's identity. The copy gets a new hash, which matters if the original is still shared with other people.
Conflicts are part of the job
A pick does not always fit where you land it. When it does not:
git add .
git cherry-pick --continue
Resolve the conflict like any other merge, stage it, and continue. Git keeps the pick waiting until you finish, so it will remind you whenever you try to commit while a pick is half done.