Skip to content

Instantly share code, notes, and snippets.

@zulhfreelancer
Last active December 2, 2015 07:37
Show Gist options
  • Save zulhfreelancer/c9d063d2014ac71aac15 to your computer and use it in GitHub Desktop.
Save zulhfreelancer/c9d063d2014ac71aac15 to your computer and use it in GitHub Desktop.
How to delete all local git merged branches at once except master branch?
  1. git checkout master
  2. git branch --merged master | grep -v master | xargs git branch -d
  3. Done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment