pr-to-main-cleanup
PR to Main Cleanup
Delete merged feature branches after PR is merged to main.
Workflow
-
Gather context (parallel):
git branchto identify current branchgit log --oneline -1to confirm current state
-
Execute cleanup:
- Switch to main branch
- Pull latest changes from origin
- Delete local feature branch
- Delete remote feature branch
Commands
git checkout main && git pull origin main && git branch -D <branch-name> && git push origin --delete <branch-name>
Important Notes
- PRs to main are always squash-merged, so use
-D(force delete) since git cannot detect squash merges as "merged" - Always pull latest main before deleting to sync merge status
More from breaking-brake/cc-wf-studio
code-review-small
Quick code review for small PRs (<100 lines). Focuses on basic code quality, naming conventions, and obvious bugs.
37code-review-large
In-depth code review for large PRs (>500 lines). Full analysis including architecture, performance, security, and maintainability.
35code-review-medium
Standard code review for medium PRs (100-500 lines). Includes code quality, security basics, and test coverage analysis.
34code-review
Analyze PR diffs and generate review comments from code quality, security, and performance perspectives. Use for code reviews, quality checks, and security analysis.
33pr-to-production
Create a release PR from main to production branch. Use when the user says "リリースPR", "productionにPR", "リリース準備", or wants to trigger a release.
1pr-to-main
Create a PR to main branch for feature/fix changes. Use when the user says "PRを作成", "mainにPR", or wants to submit changes for review.
1