Created
January 19, 2026 14:56
-
-
Save cboudereau/f5dc0310c0d365742773090620b28b8a to your computer and use it in GitHub Desktop.
remove remote git 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
| g branch --format='%(committerdate:iso-local);%(refname:short)' --list origin/* -r | awk -F ';' '{ print $2 }' | grep -v -e "origin/master" -e "origin/main" -e "origin$" | awk '{ print $1 }' | xargs -I{} echo g push origin --delete {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment