How do I make git grep
ignore large text files? Though I have some thousands of them, I never need to grep over them. (Think of foreign-language dictionary.) Hence, every time I do git grep
I have to specify a path explicitly or cd
there, because else it would take ages:
$ time git grep something somewhere/
somewhere/file.txt: something
real 0m0.049s
user 0m0.044s
sys 0m0.040s
If I could make git grep
ignore said files, I would do it with less typing:
$ time git grep something
somewhere/file.txt: something
real 1m22.159s
user 0m0.472s
sys 0m1.448s
This used to be the case, but now the times are appalling. Also, I can't remove these files from git, because I need to track changes in them. Hence, adding them to .gitignore
doesn't help.