Last active
March 5, 2025 14:02
-
-
Save shospodarets/aaa984893a161479b8a892b68725e756 to your computer and use it in GitHub Desktop.
Delete all the local Git branches except the current one
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git branch | grep -v (git rev-parse --abbrev-ref HEAD) | xargs git branch -D |
Author
shospodarets
commented
Apr 24, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment