Skip to content

Instantly share code, notes, and snippets.

@the-glima
Last active May 28, 2020 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save the-glima/102ed3ae45494862c9b1381fb6749275 to your computer and use it in GitHub Desktop.
Save the-glima/102ed3ae45494862c9b1381fb6749275 to your computer and use it in GitHub Desktop.
[Git] Clean Branches Alias #website
# 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