Skip to content

Instantly share code, notes, and snippets.

@msng
Created September 29, 2019 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msng/cb58fcdcc935e3d9d7add445301c3187 to your computer and use it in GitHub Desktop.
Save msng/cb58fcdcc935e3d9d7add445301c3187 to your computer and use it in GitHub Desktop.
[alias]
delete-merged-branches = !git branch --merged master | grep -v -e \\* -e master -e develop | xargs git branch -d
delete-merged-remote-branches = !git fetch --all --prune && git branch -r --merged master | grep -v -e master -e develop | sed -e 's%/% %' | xargs -n 2 git push --delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment