Created
January 9, 2022 03:27
-
-
Save ifirmawan/86bd98c81c9784e550b4167d6a54feee to your computer and use it in GitHub Desktop.
Remove all unused branch except current, main or master
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
git for-each-ref --format '%(refname:short)' refs/heads | grep -v "master\|main" | xargs git branch -D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment