Created
April 9, 2023 02:16
-
-
Save lorddev/9f26274cbe2366b72c933925b5c5f227 to your computer and use it in GitHub Desktop.
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 --merged | egrep -v "(^\*|master|main|dev|develop)" | xargs git branch -d | |
git branch -r --merged | grep -v master | grep -v main | grep -v dev | grep -v develop | sed 's/origin\///' | xargs -n 1 git push --delete origin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment