Skip to content

Instantly share code, notes, and snippets.

@braitom
Last active October 15, 2018 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braitom/570f8d62a677748531b98d831fc2461a to your computer and use it in GitHub Desktop.
Save braitom/570f8d62a677748531b98d831fc2461a to your computer and use it in GitHub Desktop.
delete all merged branch
$ git checkout master && git branch --merged | grep -v '*' | xargs -I % git branch -d %
or
$ git branch --merged | grep -vE '^\*|master$|develop$' | xargs -p -I % git branch -d %
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment