[git] Fix git-purge
This commit is contained in:
parent
d1ef5a0b26
commit
7a5a85e711
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue