Skip to content

Instantly share code, notes, and snippets.

@ksindi
Created December 28, 2017 20:37
Show Gist options
  • Save ksindi/a46a1e3b1ab49dcb4dd33dedafccab45 to your computer and use it in GitHub Desktop.
Save ksindi/a46a1e3b1ab49dcb4dd33dedafccab45 to your computer and use it in GitHub Desktop.
[alias]
delete-merged-branches = "!f() { git checkout --quiet master && git branch --merged | grep --invert-match '\\*' | xargs -n 1 git branch --delete; git checkout --quiet @{-1}; }; f" # http://stackoverflow.com/a/6127884/2624466
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment