This commit is contained in:
2020-10-06 19:33:37 -05:00
1774 changed files with 89990 additions and 22172 deletions

View File

@ -6,6 +6,8 @@
# Great way to clean up your branches after messing around a lot
#
AWK=$(which gawk || which awk)
KEEP="RC|RCBugFix|dev|master|bugfix-1|bugfix-2"
echo "Fetching latest upstream and origin..."
@ -18,7 +20,7 @@ git branch --merged | egrep -v "^\*|$KEEP" | xargs -n 1 git branch -d
echo
echo "Pruning Remotely-deleted Branches..."
git branch -vv | egrep -v "^\*|$KEEP" | grep ': gone]' | gawk '{print $1}' | xargs -n 1 git branch -D
git branch -vv | egrep -v "^\*|$KEEP" | grep ': gone]' | "$AWK" '{print $1}' | xargs -n 1 git branch -D
echo
# List fork branches that don't match local branches