Skip to content

Instantly share code, notes, and snippets.

@MarvinJWendt
Last active December 26, 2023 06:34
Show Gist options
  • Save MarvinJWendt/c79dc4f4b25e6400455573ee2fa7b33a to your computer and use it in GitHub Desktop.
Save MarvinJWendt/c79dc4f4b25e6400455573ee2fa7b33a to your computer and use it in GitHub Desktop.
Deletes merged local branches, except "main" or "master".
git branch --merged | egrep -v "(^\*|main|master)" | xargs git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment