Vin*_*nay 81 git grep file-extension
我知道,如果我只想对具有特定扩展名的文件进行格式化,我可以这样做:
// searches recursively and matches case insensitively in only javascript files
// for "res" from the current directory
grep -iIr --include=*.js res ./
Run Code Online (Sandbox Code Playgroud)
我一直试图通过git grep搜索一种方法(利用git grep从它存储的索引中获得的速度),但无济于事.我在这里看到不能排除某些文件类型.
CB *_*ley 133
是的,例如:
git grep res -- '*.js'
Run Code Online (Sandbox Code Playgroud)