Created
October 23, 2013 12:38
-
-
Save MichaelPereira/7117888 to your computer and use it in GitHub Desktop.
Verify if a git branch has been pushed to production
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
| for branch in `git branch | grep DMX | sed 's/\*/ /' |cut -f3 -d' '`; do | |
| echo $branch | |
| if [ `git branch -r --contains $branch | grep -c origin/prod` -gt 0 ]; then | |
| git branch -d $branch | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment