Skip to content

Instantly share code, notes, and snippets.

@tomcant
Created October 18, 2019 12:36
Show Gist options
  • Save tomcant/c834a5431082b3407dcf418499a3cb4c to your computer and use it in GitHub Desktop.
Save tomcant/c834a5431082b3407dcf418499a3cb4c to your computer and use it in GitHub Desktop.
Put this in ~/.gitconfig to create the "dmerged" Git alias. This deletes local branches that have been merged.
[alias]
dmerged = "!git branch --merged | grep -v '\\*\\|master' | xargs -n 1 git branch -d"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment