git search all branches

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

Source

Also in Shell: