Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

malyw commented Apr 24, 2017


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.