Forked from maurobringolf/delete-all-git-branches-except-current.sh
Created
October 2, 2017 14:10
-
-
Save juanfernandes/70c225cf9bf963fb94df7c570bdbc976 to your computer and use it in GitHub Desktop.
Deletes all 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment