cherry-pick
Installation
SKILL.md
Cherry-pick the PR with the GitHub URL $0 to the $1 branch. This command is only run when automated cherry-picking failed, so expect merge conflicts.
Steps
-
Gather PR information using
gh pr view:- The base branch the PR was merged into (source branch)
- The merge commit SHA
- The PR branch name
- The PR title
- The PR description
- The PR labels
-
Prepare branches:
- Fetch latest commits for the source branch:
git fetch origin <source-branch> - Fetch latest commits for the target branch:
git fetch origin $1 - Create a new branch from the remote target branch using
--no-track:git checkout -b <branch-name> origin/$1 --no-track - Name the branch using the PR branch name with the target branch as suffix (e.g.,
fix/click-event-listener-$1)
- Fetch latest commits for the source branch: