Created
March 9, 2016 22:41
-
-
Save diogobaracho/699b3a52b6217642d7c1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
#To delete every branch merged except branchs 'homologa' & 'master': | |
for b in `git branch --merged | grep -v \*`; | |
do | |
if [ "$b" != "homologa" ] && [ "$b" != "master" ]; then | |
echo $b; | |
git push --delete origin $b; | |
git branch -D $b; | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment