← スキル一覧に戻る

cleanup-merged-branches
by Tai-ch0802
A Chrome extension that mimics the vertical tabs of the Arc browser.
⭐ 4🍴 2📅 2026年1月23日
SKILL.md
name: cleanup-merged-branches description: "Deletes local and remote git branches that have been merged into main."
Cleanup Merged Branches
This skill safely deletes git branches that have been merged into the main branch.
Procedure
1. Fetch and Prune Remote
git fetch --prune
2. List Merged Branches (Preview)
# Local branches merged into main (excluding main itself)
git branch --merged main | grep -v "main" | grep -v "^\*"
# Remote branches merged into main
git branch -r --merged main | grep -v "main" | grep -v "HEAD"
3. Delete Local Branches
git branch --merged main | grep -v "main" | grep -v "^\*" | xargs -r git branch -d
4. Delete Remote Branches
# For each remote branch (e.g., origin/feature-branch)
git push origin --delete <branch-name>
Safety Notes
- Always preview before deleting (
-dis safe,-Dforce deletes) - Never delete
main- the grep filters exclude it - Confirm with user before deleting remote branches (destructive action)
- Protected branches - some branches may be protected on GitHub
スコア
総合スコア
65/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
1ヶ月以内に更新
+10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
レビュー
💬
レビュー機能は近日公開予定です


