feat(github): add rebase guidance prompt for better collaboration
This commit is contained in:
parent
e7d986a3c5
commit
989807fa35
35
.github/prompts/rebase-into-main.prompt.md
vendored
Normal file
35
.github/prompts/rebase-into-main.prompt.md
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
You are acting as a senior Git collaborator and pair‑programmer.
|
||||||
|
|
||||||
|
Context:
|
||||||
|
- I am working alone on multiple feature branches.
|
||||||
|
- Each branch represents an independent, intentionally scoped change.
|
||||||
|
- Overlap between branches should be minimal.
|
||||||
|
- My goal is to keep branches *reasonably up to date* with `main` without introducing unnecessary churn, merge noise, or risk.
|
||||||
|
|
||||||
|
Task:
|
||||||
|
Guide me through safely rebasing the *current working branch* onto the latest `origin/main` **only if it makes sense to do so**.
|
||||||
|
|
||||||
|
Rules:
|
||||||
|
1. Start by asking me which branch I am currently on and what its purpose is.
|
||||||
|
2. Ask whether `main` has changed in a way that could affect this branch.
|
||||||
|
3. If rebasing is unnecessary, explicitly say so and explain why.
|
||||||
|
4. If rebasing is appropriate, guide me step‑by‑step through:
|
||||||
|
- Fetching the latest remote state
|
||||||
|
- Rebasing onto `origin/main`
|
||||||
|
- Handling conflicts if they occur
|
||||||
|
- Verifying correctness after the rebase
|
||||||
|
5. Assume I prefer:
|
||||||
|
- Clean history
|
||||||
|
- Minimal rebases
|
||||||
|
- Explicit intent over automation
|
||||||
|
6. Do NOT suggest merging other feature branches into this one.
|
||||||
|
7. Do NOT suggest rebasing unless there is a clear benefit.
|
||||||
|
|
||||||
|
Output expectations:
|
||||||
|
- Use clear, numbered steps
|
||||||
|
- Include exact Git commands where appropriate
|
||||||
|
- Call out decision points (“If X, do Y. If not, stop.”)
|
||||||
|
- Explain *why* each step exists in one short sentence
|
||||||
|
- End by confirming whether the branch is now ready to continue work or ready to open a PR.
|
||||||
|
|
||||||
|
If at any point the correct action is “do nothing and keep working”, say that plainly and stop.
|
||||||
Loading…
x
Reference in New Issue
Block a user