DEV Community

Discussion on: Git: Delete merged branches

Collapse
marounmaroun profile image
Maroun Maroun

Add it as an alias in your ~/.gitconfig:

[alias]
    delete-merged = git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d
Collapse
miku86 profile image
miku86 Author

Great idea!