Created
May 2, 2014 19:29
-
-
Save zol/62c772d94d33581b9ab6 to your computer and use it in GitHub Desktop.
Remove branches from origin that have been merged into master except devel
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
git fetch | |
git checkout master | |
git branch --merged | grep -v "\*" | grep -v devel | xargs -n 1 git push --delete origin | |
# this last step is for colleagues to clean up their local tracking branches | |
git remote prune origin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment