DEV Community

loading...

Discussion on: 7 habits for better git usage

Collapse
tosbourn profile image
Toby Osbourn

Great habits!

This is the code I use for keeping local branches tidy. Sharing in case it helps anyone else.

git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d