gitgrep

How to exclude certain directories/files from git grep search


Is there a way to exclude certain paths/directories/files when searching a git repository using git grep? Something similar to the --exclude option in the normal grep command?

I need to use git grep because using grep directly runs too slowly on large git repositories.


Solution

  • It's not possible, but has been discussed recently. Proposed workaround in link:

    You can put *.dll to .gitignore file then git grep --exclude-standard.

    EDIT see onlynone's answer, since git 1.9.0 it's possible.