Skip to content

Instantly share code, notes, and snippets.

@sandfox
Created April 25, 2018 15:32
Show Gist options
  • Save sandfox/acf01019a91858048b6b34af366cc700 to your computer and use it in GitHub Desktop.
Save sandfox/acf01019a91858048b6b34af366cc700 to your computer and use it in GitHub Desktop.
trim local branches in git
git checkout mater git branch --merged | egrep -v "(^\*|master)" | xargs git branch -d
git remote prune origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment