diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-07-05 19:55:48 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-07-05 19:55:48 +0900 |
| commit | ad48c0d623408b42d1ad269297176f51ca4c4182 (patch) | |
| tree | ab02f169d8fb14ef919ffde6c5b47adb9d6ce136 /.config | |
| parent | 9e2045a90de4a0a349652df5122c6318b18c611f (diff) | |
| download | dotfiles-ad48c0d623408b42d1ad269297176f51ca4c4182.tar.gz dotfiles-ad48c0d623408b42d1ad269297176f51ca4c4182.tar.zst dotfiles-ad48c0d623408b42d1ad269297176f51ca4c4182.zip | |
git: add prune-merged-branches alias
Diffstat (limited to '.config')
| -rw-r--r-- | .config/git/config | 6 |
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" |
