Created
November 27, 2017 16:19
Star
You must be signed in to star a gist
This simple script will prune the removed branches on remote, list the branches that has a state of "gone" and then remove them
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 -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
The original discussion can be found in https://stackoverflow.com/questions/7726949/remove-local-branches-no-longer-on-remote