git grep in commits

C++
$ git log --grep=word

Source

Also in C++: