关键字查找
--不同的参数灵活使用
查找所有包含hello字符串的文件,、
显示关键字所在文件的行号:git grep -n hello
不显示内容,只显示文件名: git grep --name -only
查看每个文件有多少个匹配:git grep -c hello
在特定版本里查找:
在v1.0版本里查找:Git grep string v1.0
组合查找
与查找,或查找
查找hello world: git grep -e hello --and -e world
查找hello或world: git grep -e hello --or -e world