Stack Overflowで紹介されていた技法なのですが、日本語で紹介した記事がどこにもないようだったので。 https://stackoverflow.com/questions/18278774/search-git-remote-all-branches-for-file-contents 全ブランチから文字列検索する git grep 【キーワード】 $(git branch -a --format='%(objectname) %(refname:short)' | sort | uniq -w 40 | cut -c 42-)