2015-10-28 59 views
5

git branch --all列出了很多分支,我正在尋找一個包含字符串1234的字符串,這是我們項目管理系統中的一個問題編號。做分支名稱的通配符過濾器

以下在PowerShell中工作,我想用shell不可知的東西替換它。

PS> git branch --all | where { $_ -like "*1234*" } 

我們如何做到這一點單獨gitgit

回答

8

git branch --list "*1234*"做你所需要的。或者git branch --list \*1234\*