I see some similar questions on StackOverflow which say to run the command
git branch | grep -v "master" | xargs git branch -D
However this only removes branches which I have checked out at some point. My current issue is I have pulled down 54 thousand branches which I have never checked out by running git fetch
and now I want to remove all these.
Here's what I see when I run git checkout [TAB]
:
do you wish to see all X possibilities (Y lines)?