DEV Community

Discussion on: Git: How to delete all local branches except master

Collapse
 
vishnumeera profile image
VishnuSankar

thank you so much, just added one more check

git branch | %{$.Trim()} | ?{$ -ne 'master' -and $.Substring(0,1) -ne '*'} | %{git branch -D $}