Skip to content

Instantly share code, notes, and snippets.

@cnotv
Last active February 8, 2019 14:13
Show Gist options
  • Save cnotv/7ebce9b37e23edd8f440baa0a45bf924 to your computer and use it in GitHub Desktop.
Save cnotv/7ebce9b37e23edd8f440baa0a45bf924 to your computer and use it in GitHub Desktop.
Remove unused branches locally
git checkout master
git fetch -p
git branch | grep -v "master" | xargs git branch -D
git reset --hard origin/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment