Skip to content

Instantly share code, notes, and snippets.

@marek-pietrzak-tg
Created September 7, 2016 11:57
Show Gist options
  • Save marek-pietrzak-tg/e0dc49f9fc416a5d94e5c9e115796ae0 to your computer and use it in GitHub Desktop.
Save marek-pietrzak-tg/e0dc49f9fc416a5d94e5c9e115796ae0 to your computer and use it in GitHub Desktop.
git branch --merged | egrep -v '(^\*|master|uat)' | xargs git branch -d
@marek-pietrzak-tg
Copy link
Author

Fully aggressive version (removes all local git branches apart from master and develop:

git branch | egrep -v '(^\*|master|develop)' | xargs git branch -D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment