Created
September 8, 2011 10:02
-
-
Save tekkub/1203061 to your computer and use it in GitHub Desktop.
Git aliases to prune merged branches
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
[alias] | |
prunelocal = !sh -c 'git branch -d `git branch --merged | grep -v "^*" | tr -d "\\n"`' | |
pruneorigin = !sh -c 'git push origin `git branch -r --merged | grep \"^ origin/\" | grep -v "/master$" | sed "s/origin./:/g" | tr -d "\\n"`' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ayust : agreed. I usually don't bother with shell alias coding style, but it's already hard enough to understand what the command does.