Skip to content

Instantly share code, notes, and snippets.

@banqhsia
Created September 13, 2022 10:57
Show Gist options
  • Save banqhsia/77d0a37fde5df3690a7b925e02ab886c to your computer and use it in GitHub Desktop.
Save banqhsia/77d0a37fde5df3690a7b925e02ab886c to your computer and use it in GitHub Desktop.
Clean up merged old git branches
git branch -vv | grep ": gone]" | grep -v "*" | awk '{print $1}' | xargs -r git branch -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment