Skip to content

Instantly share code, notes, and snippets.

@Davidslv
Last active August 29, 2015 13:57
Show Gist options
  • Save Davidslv/9638631 to your computer and use it in GitHub Desktop.
Save Davidslv/9638631 to your computer and use it in GitHub Desktop.
Remove merged branches from local repo

If you want to do some housekeeping locally and want to remove branches that have been merged, checkout master and then:

git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment