Skip to content

Instantly share code, notes, and snippets.

@mikepmunroe
Created November 13, 2018 14:50
Show Gist options
  • Save mikepmunroe/9278fadbacb406438b28b9654ece9ebc to your computer and use it in GitHub Desktop.
Save mikepmunroe/9278fadbacb406438b28b9654ece9ebc to your computer and use it in GitHub Desktop.
prune local git repos that have been merge into master
git branch --merged master | grep -v '^[ *]*master$' | xargs git branch -d
- from https://stackoverflow.com/questions/13064613/how-to-prune-local-tracking-branches-that-do-not-exist-on-remote-anymore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment