Last active
November 7, 2022 08:21
-
-
Save mkyed/ac2da3440b32f8bf49d1fce7cc80a686 to your computer and use it in GitHub Desktop.
Delete git branches that have no difference to master
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 | grep -v master | while read b; do test 0 -eq `git diff origin/$b $b 2>/dev/null | wc -l` && git branch -D $b; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment