参考:http://stackoverflow.com/questions/1337320/how-to-grep-git-commit-diffs-or-contents-for-a-certain-word 可使用 git log --grep If you want to find all commits where commit message contains given word, use $ git log --grep=word