# Delete all redundant git branches # 1. `git branch` lists all the branches # 2. `xargs -L1` consumes the pipe output one line at a time, feeding it as an an arg to the target command # 3. `git branch -d` deletes the branches that are redundant (already merged). # Note: this print results for each branch, either # saying it's deleted or that you need to use -D to delete it because it's not redundant. git branch | xargs -L1 git branch -d