aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-05 19:55:48 +0900
committernsfisis <nsfisis@gmail.com>2026-07-05 19:55:48 +0900
commitad48c0d623408b42d1ad269297176f51ca4c4182 (patch)
treeab02f169d8fb14ef919ffde6c5b47adb9d6ce136
parent9e2045a90de4a0a349652df5122c6318b18c611f (diff)
downloaddotfiles-ad48c0d623408b42d1ad269297176f51ca4c4182.tar.gz
dotfiles-ad48c0d623408b42d1ad269297176f51ca4c4182.tar.zst
dotfiles-ad48c0d623408b42d1ad269297176f51ca4c4182.zip
git: add prune-merged-branches alias
-rw-r--r--.config/git/config6
1 files changed, 6 insertions, 0 deletions
diff --git a/.config/git/config b/.config/git/config
index 7500d6a..f392077 100644
--- a/.config/git/config
+++ b/.config/git/config
@@ -237,3 +237,9 @@
git reset --soft \"$base_ref\" -- && \
git commit -m \"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; \
}; __fn"
+ prune-merged-branches = "!__fn() { \
+ git branch --merged \
+ | grep -v '^\\*' \
+ | sed -e 's/^[[:space:]]*//' \
+ | xargs -r git branch --delete; \
+ }; __fn"