Update 'main|dev'
with branches you want to mantain. All others will be removed.
Last active
November 15, 2020 14:42
-
-
Save fdaciuk/cda63330ab4961d6f2131a16f5e91f52 to your computer and use it in GitHub Desktop.
Remove unused git branches
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
for i in $(git branch | grep -v -E -w '(main|dev)$'); do | |
git branch -D "$i" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment