Answers for "how to delete all local branches in git except master"

1

git delete all branches except master

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

git remove all branches except master windows

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

Remove all your local git branches but keep master

git branch | grep -v “master” | xargs git branch -D
Posted by: Guest on August-06-2021
0

how to delete all branches in git local

git branch | grep -v "main" | xargs git branch -D
Posted by: Guest on February-05-2022
0

remove all branch local git

git branch | grep -v "develop" | grep -v "master" | xargs git branch -D
Posted by: Guest on March-18-2022

Code answers related to "how to delete all local branches in git except master"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language