Created
September 20, 2021 16:48
-
-
Save tomanistor/d2b74153fe137a2d0aee0074732163ca to your computer and use it in GitHub Desktop.
Git alias to prune all 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 git-prune='git branch --merged | grep -v "\*" | grep -Ev "(\*|production|master|staging|development)" | xargs -n 1 git branch -d' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment