check commit in git log | grep commit code example Example 1: git log one line git log --oneline Example 2: git grep in commits $ git log --grep=word