Skip to content

Commit 2d2865f

Browse files
alsepkowCopilot
andcommitted
Provide cherry-pick guidance as a skill instead of instructions
Per review feedback, move the cherry-pick convention out of .github/copilot-instructions.md (which is injected into every prompt) and into an on-demand skill at .github/skills/cherry-pick/SKILL.md. The skill is auto-discovered from the repo and only loaded when relevant, keeping it out of unrelated prompts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent af0795f commit 2d2865f

2 files changed

Lines changed: 23 additions & 7 deletions

File tree

.github/copilot-instructions.md

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: cherry-pick
3+
description: Cherry-pick a commit onto another branch and open the PR. Use when the user asks to cherry-pick or backport a commit or PR to a release branch.
4+
---
5+
6+
# Cherry-picking commits
7+
8+
Use this when asked to cherry-pick or backport a change.
9+
10+
1. Identify the source commit SHA to cherry-pick. If the source PR was
11+
squash-merged, the single squashed commit on the target branch is what you
12+
cherry-pick.
13+
2. Create a topic branch off the destination branch.
14+
3. Apply the change with `git cherry-pick -x <sha>` so the commit message
15+
records the source commit in git's standard format:
16+
17+
```
18+
(cherry picked from commit <sha>)
19+
```
20+
21+
Keep the cherry-pick commit message as git generates it by default.
22+
4. Open the PR with the title prefixed `[Cherry-Pick]`, followed by the
23+
original commit subject.

0 commit comments

Comments
 (0)