TOC

在 Git 历史记录中搜索

搜索提交信息

git log --grep=fix: --oneline --after='2018-07-01' --author=markjour

搜索历史文件

git grep -C3 sign_position $(git rev-list --all)

搜索 diff 内容

git log -G'前置'
git log -G'前置' -p | grep '前置' -C5
git log -G'前置' --oneline --name-status

-S<string> --pickaxe-regex-G<regex> 作用相近,
不过 -S 只会列出搜索内容增删的相关信息,也就是所在行修改了,但是搜索内容没有变化的会忽略