Add rule to delete branches after merge #16

Merged
rhino merged 1 commits from cursor/delete-branch-after-merge into main 2026-10-05 08:03:22 +00:00

View File

@@ -0,0 +1,16 @@
---
description: Delete feature branches after merging PRs in this repo
alwaysApply: true
---
# Delete branch after merge
After merging a pull request in this repository:
1. Delete the **remote** feature branch.
2. Delete the **local** feature branch if it exists.
3. Prune stale remote-tracking refs (`git fetch --prune` or equivalent).
Prefer in order: `tea pulls clean <pr>`, then Gitea API / `git push --delete`, then local `git branch -d`.
Do this automatically after every merge unless the user explicitly says to keep the branch.