Skip to content

Instantly share code, notes, and snippets.

@jamie94bc
Created May 6, 2021 09:55
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 jamie94bc/faa38f4a9bb7c5e7ba0fe0b51f556887 to your computer and use it in GitHub Desktop.
Save jamie94bc/faa38f4a9bb7c5e7ba0fe0b51f556887 to your computer and use it in GitHub Desktop.
Script to delete merged branches in git
git for-each-ref --format '%(refname:short)' refs/heads/ | grep -v master | xargs git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment