Answers for "how to delete all branches except master"

11

how to delete all branches except master

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

delete all local branches except current branch

git branch | grep -v "master" | grep -v ^* | xargs git branch -D
Posted by: Guest on June-28-2021

Code answers related to "how to delete all branches except master"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language