Delete all branches except the master

0

In my project I have created many branches. After a fusion or merge request ( merge request ) I delete the branch that I merged with the master on GitHub but the branch stays my laptop.

I know I can erase them one by one, but is there any way to delete all the branches, except the master? .

    
asked by toledano 05.04.2017 в 17:58
source

1 answer

3

In my case I used this instruction:

$ git branch | grep -v "master" | xargs git branch -D

try it and tell me!

Do not forget to have a backup of your project!

    
answered by 05.04.2017 / 18:07
source