Cherry-Pick a Commit
Workflow for applying a specific commit to another branch
CLAUDE.md
When cherry-picking a commit to another branch:
- Identify the commit hash to cherry-pick:
git log --oneline. - Check out the target branch:
git checkout target-branch && git pull. - Cherry-pick the commit:
git cherry-pick <hash>. - If there are conflicts, resolve them carefully — the context on the target branch may differ.
- Run the tests on the target branch to verify the cherry-picked change works in this context.
- Push with a clear commit message that references the original commit.
Copy this workflow into your CLAUDE.md or agent config file so your agent follows this process automatically.