Skip to content

Instantly share code, notes, and snippets.

@JefMari
Created November 5, 2018 01:23
Show Gist options
  • Save JefMari/8ee3a2b1f9007e039ca1ee150bdec1b7 to your computer and use it in GitHub Desktop.
Save JefMari/8ee3a2b1f9007e039ca1ee150bdec1b7 to your computer and use it in GitHub Desktop.
Delete all local branch except master

Delete all local branch except master and unmerged branch

git branch | grep -v "master" | xargs git branch -d

Delete all local branch except master

git branch | grep -v "master" | xargs git branch -D

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