Skip to content

Instantly share code, notes, and snippets.

@tabuchid
Created April 5, 2012 16:27
Show Gist options
  • Save tabuchid/2312335 to your computer and use it in GitHub Desktop.
Save tabuchid/2312335 to your computer and use it in GitHub Desktop.
Get rid of merged branches
function gitclean(){
git remote prune origin
git branch -a --merged | grep -v master | sed -e 's/.*\//:/g' | xargs git push origin
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment