所谓的 poor solution
git log -p | grep <pattern>
能应付绝大多数场景
git grep <regexp> $(git rev-list --all)
针对 commit message
git log --grep=word
有点高级了
git log -Sword
// or
git log -Gword
StackOverflow 是好朋友
How to grep (search) committed code in the git history?
How to grep Git commit diffs or contents for a certain word?
网友评论