From 989807fa35fd05932dcea7e2a6b22570906f4f84 Mon Sep 17 00:00:00 2001 From: Nathan Castaldi Date: Thu, 16 Apr 2026 08:50:03 -0400 Subject: [PATCH] feat(github): add rebase guidance prompt for better collaboration --- .github/prompts/rebase-into-main.prompt.md | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/prompts/rebase-into-main.prompt.md diff --git a/.github/prompts/rebase-into-main.prompt.md b/.github/prompts/rebase-into-main.prompt.md new file mode 100644 index 0000000..c96f41e --- /dev/null +++ b/.github/prompts/rebase-into-main.prompt.md @@ -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. \ No newline at end of file