Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to omit very long lines from `git grep`?

I'm searching through my repository (with vim-fugitive's :Ggrep), I have different .js files - the minified ones and the regular ones.

I would like to omit from git grep the minified files (in other words - the very long lines that match the query). I looked into git help grep and googled but couldn't find anything. All ideas are welcomed.

like image 377
valk Avatar asked Jan 07 '23 09:01

valk


1 Answers

for me, the best way was to create a file with name .gitattributes and this content:

*.min.js binary *.min.css binary

like image 152
Benni Avatar answered Jan 08 '23 23:01

Benni