Skip to content

Instantly share code, notes, and snippets.

@brenes
Created April 14, 2016 11:04
Show Gist options
  • Save brenes/94a50a6b95d28c5aa9ec279feb8ac92e to your computer and use it in GitHub Desktop.
Save brenes/94a50a6b95d28c5aa9ec279feb8ac92e to your computer and use it in GitHub Desktop.
Common one liners
Delete local merged branches: git branch --merged | xargs -I BRANCH git branch -d BRANCH
Delete remote merged branches: git branch -r --merged | grep -v '^*' | grep -v master | sed 's/origin\///g' | xargs -I BRANCH -P 10 git push origin :BRANCH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment