Skip to content

Instantly share code, notes, and snippets.

@chrisnx
Last active March 9, 2021 12:15
Show Gist options
  • Save chrisnx/3ce2ab82afb5084a02a5b4b967ccf87e to your computer and use it in GitHub Desktop.
Save chrisnx/3ce2ab82afb5084a02a5b4b967ccf87e to your computer and use it in GitHub Desktop.
Handy alias for cleaning up stale local branches with git.
alias gitclean='git branch --merged | egrep -v "(^\*|master|develop|main)" | xargs git branch -d'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment