Skip to content

Instantly share code, notes, and snippets.

@aezell
Created June 26, 2012 14:52
Show Gist options
  • Save aezell/2996239 to your computer and use it in GitHub Desktop.
Save aezell/2996239 to your computer and use it in GitHub Desktop.
Pruning Branches
[alias]
prunelocal = !sh -c 'git branch -d `git branch --merged | grep -v "^*"`'
pruneorigin = !sh -c 'git push origin `git branch -r --merged | grep \"^ origin/\" | grep -v "/master$" | sed "s/origin./:/g" | tr -d "\\n"`'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment