Search for a branch with git

Got a load of branches?
Need to find a specific one?

Try this

git branch --all | grep <query>

for example

git branch --all | grep notifications

Will return all branches (remote or local) that contain “notifications” in the name of the branch

Leave a Reply

Your email address will not be published. Required fields are marked *