Last active
May 23, 2023 19:48
-
-
Save aldenw/a64c01ff9f18c660f114d2611fa6bb06 to your computer and use it in GitHub Desktop.
Delete already merged remote branches
This file contains hidden or 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 --merged | egrep -v '(master|main|release|development)' | 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
From the release/main branch run this to delete all merged remote branches