Skip to content

Instantly share code, notes, and snippets.

@yurkimus
Created July 11, 2024 15:41
Show Gist options
  • Save yurkimus/5f5ced7f2596339a8f9a9f8a9fb4cf04 to your computer and use it in GitHub Desktop.
Save yurkimus/5f5ced7f2596339a8f9a9f8a9fb4cf04 to your computer and use it in GitHub Desktop.
Delete all branches except main
# -v --invert-match
git branch -D $(git branch | grep -v main)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment