Created
March 24, 2016 14:49
-
-
Save TheAmazingPT/0eeb1a103e94891c3bfb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git branch --merged | |
echo | |
read -p "Do you want to delete these branches? [y|n]" -n 1 confirmation | |
echo | |
case "$confirmation" in | |
n|N) exit 0;; | |
esac | |
echo | |
echo "Dropping all branches" | |
echo | |
branches=$(git branch --merged | wc -l) | |
for index in $(seq 1 $branches) | |
do | |
git branch --merged | |
done | |
echo | |
echo "Dropped all branches" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment