search in git commit messages code example Example 1: search by commit message git log --all --grep='Build 0051' Example 2: finding commit using a message stackoverflow