Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 16 lines (11 sloc) 453 Bytes
#!/bin/sh
BASE_DIR=$(cd $(dirname $0); pwd)
# remove merged branches
git for-each-ref --format='%(refname)' refs/heads | while read branch; do
git rev-parse --quiet --verify "$branch" > /dev/null || continue # make sure it still exists
git symbolic-ref HEAD "$branch"
# echo "merged branches:"
# git branch --merged | grep -v '^\*'
git branch -d $( git branch --merged | grep -v '^\*' | grep -v 'master' )
done
git checkout master
Something went wrong with that request. Please try again.