Skip to content

Instantly share code, notes, and snippets.

@braitom
Last active October 15, 2018 15:28
Show Gist options
  • 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