mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
13 lines
277 B
Bash
Executable file
13 lines
277 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
branches=$(git branch --no-color --merged |
|
|
grep -vE "^(\*|\+)" |
|
|
grep -v "$(git_extra_default_branch)" |
|
|
grep -v svn \
|
|
)
|
|
# REFACTOR: use `xargs -r` when widely available
|
|
if [ -n "$branches" ]
|
|
then
|
|
echo "$branches" | xargs git branch -d
|
|
fi
|