Andrew Andrew - 1 year ago 161
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.

Answer Source

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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download