diff --git a/git-prune-local b/git-prune-local index 5bd6e22..068b113 100755 --- a/git-prune-local +++ b/git-prune-local @@ -1,21 +1,3 @@ #!/bin/bash -git branch --merged | while read line -do - # If the line is in the format '* master' (indicating the current branch), - # this will be effectively empty, so we don't somehow delete the current - # branch - BRANCH=`echo "$line" | awk -F '*' '{ print $1 }'` - - if [ -z "$BRANCH" ] - then - continue - fi - - if [ "$BRANCH" == "master" ] - then - continue - fi - - git branch -d "$BRANCH" -done +git branch --merged | grep -v ^* | grep -v ^\ \ master$ | xargs git branch -d