Answers for "git how t delete all branch exept main"

18

how to delete all branches except master

$ git branch | grep -v "master" | xargs git branch -D
Posted by: Guest on May-27-2020
1

git remove all branches except master windows

git branch | %{ $_.Trim() } | ?{ $_ -ne 'master' } | %{ git branch -D $_ }
Posted by: Guest on October-13-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language