Merge pull request 'Add rule to delete branches after merge' (#16) from cursor/delete-branch-after-merge into main
This commit was merged in pull request #16.
This commit is contained in:
16
.cursor/rules/delete-branch-after-merge.mdc
Normal file
16
.cursor/rules/delete-branch-after-merge.mdc
Normal 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.
|
||||||
Reference in New Issue
Block a user