When working in a team with Git, you often have to create and delete branches. If you are a terminal user like me, you can optimize branch deletion as follows. Maybe someone will come in handy, I use it all the time.
Before:
1 2 3 4 5 6 7 8 |
% git branch MOBL-2509/0 MOBL-2509/1 MOBL-2522/0 MOBL-2522/1 MOBL-2522/2 * master release/5.4 |
Apply:
1 |
% git branch | grep "MOBL" | xargs git branch -d |
After:
1 2 3 |
% git branch * master release/5.4 |