Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git command with wildcard expansion [duplicate]

Tags:

git

wildcard

Possible Duplicate:
Can you delete multiple branches in one command with Git?

I'm trying to clear out my old feature branches in my git repo, and I find myself typing

git branch -d SOME_BRANCH_NAME 

for each branch name. Does git support any type of wildcard expansion, so I could specify something like:

git branch -d temp_branch_* 

thanks

like image 331
worker1138 Avatar asked Sep 21 '11 17:09

worker1138


1 Answers

Well, in the worst case, you could:

git branch | grep temp_branch | xargs git branch -d
like image 125
Carl Norum Avatar answered Oct 25 '22 19:10

Carl Norum