Created
January 8, 2013 23:11
-
-
Save nickpresta/4488926 to your computer and use it in GitHub Desktop.
Clean merged branches.
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 | |
printf "\e[32mRemoving merged branches:\n\033[0m" | |
git branch --merged master | grep -v master | |
read -p "Are you sure? " -n 1 | |
echo "\n" | |
if [[ ! $REPLY =~ ^[Yy]$ ]] | |
then | |
exit 1 | |
fi | |
git branch --merged master | grep -v master | xargs git branch -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment