Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I search for branch names in Git?

Tags:

git

search

I'd like to find a specific branch, and I know that its name would contain a specific substring (the id of the issue from our bug tracker), but I don't know the whole name of the branch (this is what I want to find out).

How can I search for this branch?

like image 771
user650309 Avatar asked Aug 03 '15 12:08

user650309


People also ask

How do I find a specific branch in git?

There are two ways to clone a specific branch. You can either: Clone the repository, fetch all branches, and checkout to a specific branch immediately. Clone the repository and fetch only a single branch.


1 Answers

git branch --all | grep <id> 
like image 158
Evil Toad Avatar answered Sep 21 '22 11:09

Evil Toad