Last active
May 28, 2020 08:44
-
-
Save the-glima/102ed3ae45494862c9b1381fb6749275 to your computer and use it in GitHub Desktop.
[Git] Clean Branches Alias #website
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
# If you want to delete all the local branches except the master branch | |
alias gbCleanAll="git branch | grep -v '^*' | xargs git branch -D" | |
# If you want to be a little less adventurous and delete only branches that have been merged to master | |
alias gbClean="git branch | grep -v '^*' | xargs git branch -d" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment