Cherry-pick

You might say

I fixed a production bug inside an experimental branch, and I want only that one fix on main without merging the unfinished feature.

Copy the changes from one or more specific commits on another branch onto your current branch as new commits.Suppose you committed a standalone login bugfix in the middle of an unfinished feat/redesign branch. Switching to main and running git cherry-pick applies only that fix to main while leaving the unfinished pages behind. It does not remove the original commit and creates a new commit hash; if the picked commit relies on earlier commits from its source branch, conflicts or missing code can occur.
Know first
Git Cherry-pickgit cherry-pick

You can say this to an AI Agent

Ready to paste into Cursor, Claude Code, or Codex
Structured AI Agent prompt

Inspect the log on `feat/redesign`, locate the login null-pointer fix commit, and check its diff to confirm it does not depend on unfinished commits. Then switch to the latest `main` (or a hotfix branch), cherry-pick only that commit, run the login tests, and report the new commit hash.

Want your Agent to translate plain-language UI ideas automatically?Install free VibeHub Skill →
Oil UI Pro. Push AI’s design skills to the limit. Usability, existing projects and stricter review.
Further reading