Add rule to delete branches after merge

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-05 11:31:38 +03:30
parent 5ed357d0e3
commit e40f154fb4

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.