Created
January 29, 2026 09:18
-
-
Save chrisweight/1d72f519f246491b9e3bf9fd4d5e6b1a to your computer and use it in GitHub Desktop.
Delete local branches if remote no longer exists
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 fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment