DEV Community

Discussion on: How to delete all your local branches but keep master

Collapse
 
lesha profile image
lesha 🟨⬛️

Or better, delete everything merged into master, leaving out branches that can contain work in progress

git branch --merged master | grep -v "master" | xargs git branch -D