Created
October 23, 2023 09:26
-
-
Save culy247/3bdaacce90b8b4884e766bc386e21e7f to your computer and use it in GitHub Desktop.
Remove all remote branch by regex
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
#!/bin/bash | |
regex=test | |
git branch -r | awk -F/ '/\/$regex/{print $2}' | xargs -I {} git push origin -d {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment