Deleting Multiple Branches in Git 1. Open the terminal, or equivalent. 2. Type in git branch | grep "<pattern>" for a preview of the branches that will be deleted. 3. Type in git branch | grep "<pattern>" | xargs git branch -D.