Searching for the text "hello" in commit messages:
git log --grep="hello" -i
Note: The "-i" option is for case-insensitive search. You can also ad --oneline to make the log more compact.
Search Git Commands | More How Tos