Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shospodarets/aaa984893a161479b8a892b68725e756 to your computer and use it in GitHub Desktop.
Save shospodarets/aaa984893a161479b8a892b68725e756 to your computer and use it in GitHub Desktop.
Delete all the local Git branches except the current one
#!/usr/bin/env bash
git branch | grep -v (git rev-parse --abbrev-ref HEAD) | xargs git branch -D
@shospodarets
Copy link
Author

alt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment