Git Cherry-Pick: Apply Specific Commits to Any Branch
How to use git cherry-pick: syntax, multiple commits, conflict resolution, and when cherry-pick is the right tool.
Basic Cherry-Pick
git cherry-pick abc1234 // single commit\ngit cherry-pick abc1234 def5678 // multiple commits\ngit cherry-pick abc1234..def5678 // range (exclusive start)When to Use Cherry-Pick
- Hotfix a bug on main from a feature branch
- Backport a fix to an older release branch
- Rescue a commit from a branch you are about to delete
Try It Free
Use our free online tool — 100% client-side, no data leaves your browser.
Open .gitignore Generator