Skip to content

Instantly share code, notes, and snippets.

@devodo
Created September 21, 2018 11:32
Show Gist options
  • Save devodo/991633fda41e4a9fd446eea7635634e6 to your computer and use it in GitHub Desktop.
Save devodo/991633fda41e4a9fd446eea7635634e6 to your computer and use it in GitHub Desktop.
git clean merged branches
git config -e --global
[alias]
del-merged = "!git branch --merged master | grep -v master | cut -d/ -f2- | xargs -n1 -I % sh -i -c 'git push -d origin \"%\"; git branch -d \"%\";'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment