Workflow Git & Workflow

Cherry-Pick a Commit

Workflow for applying a specific commit to another branch

gitcherry-pickworkflow
CLAUDE.md

When cherry-picking a commit to another branch:

  1. Identify the commit hash to cherry-pick: git log --oneline.
  2. Check out the target branch: git checkout target-branch && git pull.
  3. Cherry-pick the commit: git cherry-pick <hash>.
  4. If there are conflicts, resolve them carefully — the context on the target branch may differ.
  5. Run the tests on the target branch to verify the cherry-picked change works in this context.
  6. 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.

get crystl