DEV Community

Discussion on: Remove all your local git branches but keep main

Collapse
 
lucassperez profile image
Lucas Perez

One observation to be made is if you for some reason has another branch that has "main" as part of its name, this command would not delete it. Maybe grep -v "^\*\? *main$", but then its getting already too complicated... 😅