Created
March 14, 2020 15:10
-
-
Save falehenrique/0b88811423cada2e520ddb8f5de14124 to your computer and use it in GitHub Desktop.
Remote a lot git remote 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
git branch -r | awk -F/ '/\/fix/{print $2"/"$3}' | xargs -I {} git push origin :{} | |
if you want list before, you can use it: | |
git branch -r | awk -F/ '/\/fix/{print $2"/"$3}' | |
In my case I want to delete all branches that start with the prefix "fix" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment