git cherry-pick: Apply the changes from a specific commit onto the current branch. git cherry-pick takes the changes from one specific commit and applies them as a new commit on your current branch. git cherry-pick a1b2c3d copies just that change, without merging the rest of the other branch. It is useful for backporting a fix. A bug fixed on the main branch can be cherry-picked onto a release branch that is already in production, without bringing along unfinished features.
What should you keep in mind with git cherry-pick?
Use it for exceptions, not as a regular workflow. The cherry-picked commit gets a new ID, so Git sees it as a different change, which can cause confusing conflicts later. If you find yourself cherry-picking often, your branching strategy probably needs a rethink. Add -x to record the original commit ID in the message, so you can trace where the change came from.
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback