Last active
December 16, 2015 23:39
-
-
Save renechz/5515732 to your computer and use it in GitHub Desktop.
Delete all merged-to-master branches in git.
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 | |
# Setup. | |
# Add to directory in PATH (e.g. /usr/local/bin) and make it executable. | |
# $ chmod +x git-delete-merged-branches | |
git branch -d $( git branch --merged | grep -v '^\*' | grep -v 'master' ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment