1
0
mirror of https://github.com/pgrondek/config.git synced 2024-11-22 12:03:43 +00:00

[git] Fix git-purge

This commit is contained in:
Przemysław Grondek 2019-11-28 11:15:35 +01:00
parent d1ef5a0b26
commit 7a5a85e711

View File

@ -1,3 +1,9 @@
#!/usr/bin/env sh
git branch --merged|egrep -v "(^*|master|dev)" | xargs git branch -d
BRANCHES=$(git branch --merged|egrep -v "(^\*|master|dev)")
if [ -z "${BRANCHES}" ] ; then
echo "Nothing to delete"
else
git branch -d ${BRANCHES}
fi