Last active
July 12, 2021 08:34
-
-
Save milanboers/9eff75cc2f05c48fcc532e7188dbd906 to your computer and use it in GitHub Desktop.
Delete all merged git branches on remote origin. Excludes "master" and "develop" 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 fetch -p; git branch -r --merged master | grep -Ev 'master|develop|main' | sed 's/origin\///' | xargs -n1 git push --delete origin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment