git grep across all branches

Shell
git grep "string/regexp" $(git rev-list --all)
Source

Also in Shell: