Skip to content

Instantly share code, notes, and snippets.

@devben
Last active May 2, 2019 06:24
Show Gist options
  • Select an option

  • Save devben/90d4e58eb768ba86d9e0c4c360776c17 to your computer and use it in GitHub Desktop.

Select an option

Save devben/90d4e58eb768ba86d9e0c4c360776c17 to your computer and use it in GitHub Desktop.
git delete local branches
git branch --list 'bugfix/*'
git branch -d `git branch --list 'bugfix/*'`
# or
git branch --list 'feature/*'
git branch -d `git branch --list 'feature/*'`
# or for the brave
git branch --merged | egrep -v "(^\*|master|develop|origin|release*)" | xargs git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment