Android Utils

查找 git commit 里的变动内容

2017-11-10  本文已影响0人  几千里也

所谓的 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?

上一篇 下一篇

猜你喜欢

热点阅读