Sublime Forum

How to delete all local branches except one?

#1

Hi,

I’m trying to create a sublime-command that does something like git branch | grep -v $select_local_branch | xargs git branch -D but I can’t make it work. Is there a way to do that?

Thank you!

0 Likes

#2

I believe you need to create git alias.

2 Likes

#3

That actually worked!! I didn’t even know such thing as “git aliases” existed! Thank you so much!!

0 Likes