Last active
November 29, 2017 16:02
-
-
Save stuaxo/8b836b90ea46a27c228f8ded4d42d162 to your computer and use it in GitHub Desktop.
Delete merged 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
# Make sure the list to ignore after -v is correct | |
$ git branch -r --merged develop | sed 's/ origin\///' | grep -v 'master\|staging\|develop' | xargs git push origin --delete | |
# See also | |
https://makandracards.com/makandra/621-git-delete-a-branch-local-or-remote | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment