Skip to content

Instantly share code, notes, and snippets.

@ramses-lopez
Created November 28, 2019 03:00
Show Gist options
  • Save ramses-lopez/fd5765b09165be87dab7530d32051ef5 to your computer and use it in GitHub Desktop.
Save ramses-lopez/fd5765b09165be87dab7530d32051ef5 to your computer and use it in GitHub Desktop.
Remove merged branches & remove references to deleted branches in remote
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d && git remote prune origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment