Single-commit cherry-pick is easy. A range is more powerful:
git cherry-pick A..B # all commits AFTER A through B (excludes A)
git cherry-pick A^..B # all commits A through B inclusive
Useful for porting bug fixes from main to a maintenance branch:
git switch release/1.2
git cherry-pick main~10..main~3
If conflicts arise mid-range, Git pauses. git cherry-pick --continue after resolving, or --abort to bail.
Flags worth knowing:
--no-commit — stage the changes but don't commit; useful for combining multiple cherry-picks into one.
-x — appends "(cherry picked from commit ...)" to the message; great audit trail.
--strategy=ort -X theirs — auto-resolve conflicts in favor of the source.