Last active
April 18, 2024 07:45
-
-
Save sverweij/14c5ed6e026ebd5e88b66cb2bad8b33c to your computer and use it in GitHub Desktop.
delete a batch of 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
# the grep --invert-match to prevent deletion of branches you'd want to keep no matter what | |
git branch | grep LCM | grep --invert-match master | sed s/^/git\ branch\ -D/g | sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment