Skip to content

Instantly share code, notes, and snippets.

@mick88
Created July 26, 2016 10:47
Show Gist options
  • Save mick88/655284e9a25b8c2507ef73dbe6932604 to your computer and use it in GitHub Desktop.
Save mick88/655284e9a25b8c2507ef73dbe6932604 to your computer and use it in GitHub Desktop.
Remove merged branches excluding master
#!/bin/bash
git branch --merged | grep -v "\*" | grep -v master | xargs -n 1 git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment