diff --git a/.cursor/rules/delete-branch-after-merge.mdc b/.cursor/rules/delete-branch-after-merge.mdc new file mode 100644 index 0000000..70addca --- /dev/null +++ b/.cursor/rules/delete-branch-after-merge.mdc @@ -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 `, 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.