Skip to content

Instantly share code, notes, and snippets.

@alfchee
Created November 27, 2017 16:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save alfchee/62d2cbe67e8e018f0d98aeaf33e29b37 to your computer and use it in GitHub Desktop.
This simple script will prune the removed branches on remote, list the branches that has a state of "gone" and then remove them
git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -d
@alfchee
Copy link
Author

alfchee commented Nov 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment