Skip to content

Instantly share code, notes, and snippets.

@mleko
Created November 2, 2017 09:32
Show Gist options
  • Save mleko/b1f25507b8285ae7cf362a44a04e980d to your computer and use it in GitHub Desktop.
Save mleko/b1f25507b8285ae7cf362a44a04e980d to your computer and use it in GitHub Desktop.
Git remove merged branches
#!/bin/sh
git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment