Created
May 15, 2018 22:48
-
-
Save nmccready/a5c461cb9f0a5f616ad7941bbe4b3695 to your computer and use it in GitHub Desktop.
clean your remote 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 | |
#http://stackoverflow.com/questions/6127328/how-can-i-delete-all-git-branches-which-have-been-merged | |
git branch -r --merged origin/master | grep -v "^.*master" | grep nmccready | sed s:origin/:: |xargs -n 1 git push --delete origin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment