dotfiles/bin/git-purge

10 lines
178 B
Plaintext
Raw Normal View History

2020-06-16 00:56:05 +00:00
#!/usr/bin/env sh
BRANCHES=$(git branch --merged|egrep -v "(^\*|master|dev)")
if [ -z "${BRANCHES}" ] ; then
echo "Nothing to delete"
else
git branch -d ${BRANCHES}
fi