Andrew Andrew - 2 months ago 14
Git Question

SourceTree delete all local branches under a specific directory

In SourceTree, I have about 30 branches showing up in the directory tree under a custom directory, it looks like this:

> File Status
> Branches
> Tags
> Remotes
> Stashes

Is there a git command or SourceTree button to delete all branches named
? Ideally I could just right click the folder in the directory tree and click delete, but that doesn't exist.


you can run the command, grabbing all branches with completed_branches, and executing the delete command on them.

 git branch | grep "completed_branches" | xargs git branch -D