Skip to content

Instantly share code, notes, and snippets.

@sandrotanner
Last active January 14, 2020 20:06
Show Gist options
  • Save sandrotanner/f79ece369374f9f33b5daa111effb804 to your computer and use it in GitHub Desktop.
Save sandrotanner/f79ece369374f9f33b5daa111effb804 to your computer and use it in GitHub Desktop.

deletes all local branches that are merged into master

git branch | grep -v '^*' | xargs git branch -d

use uppercase -D to force delete also branches that haven't been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment