Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whitep4nth3r/e6b10ef17636e29010d7a8b57800685e to your computer and use it in GitHub Desktop.
Save whitep4nth3r/e6b10ef17636e29010d7a8b57800685e to your computer and use it in GitHub Desktop.
Delete all branches merged into main
// Add to your shell configuration to improve your life!
dam() {
git checkout main && git branch --merged | egrep -v "(^\*|main)" | xargs git branch -d
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment