Last active
October 21, 2016 21:39
-
-
Save benspaulding/29a900c7c7b4f89ccf6d to your computer and use it in GitHub Desktop.
Delete git-flow type branches that were not automatically deleted
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
git checkout master | |
git pull | |
git branch --all --merged master | ack hotfix/ | xargs git branch -d | |
git checkout dev | |
git pull | |
git branch --all --merged dev | ack feature/ | xargs git branch -d | |
git branch --all --merged origin/master | ack origin/hotfix/ | sed -e 's: remotes\/origin\/::' | xargs git push --delete origingit branch --all --merged origin/master | ack origin/hotfix/ | sed -e 's: remotes\/origin\/::' | xargs git push --delete origin | |
git branch --all --merged origin/dev | ack origin/feature/ | sed -e 's: remotes\/origin\/::' | xargs git push --delete origin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment