Is there any way to exclude certain directories when searching a particular github project?
In a large project on Github like nodejs, I often want to search the source code to find where in the project something is defined. A challenge I regularly run into is that the project itself contains hundreds of files related to module tests and these test directories clog up the search results when I'm trying to find something in the actual source, not in the testing code. So, instead of getting 5 pages of results to look through, I might get 50 pages of results, rendering the search somewhat useless.
In the nodejs project, I'd like to search without including the top level "test" directory.
To search in one particular directory you can use:
searchterm path:/lib
And to ignore a directory you can use:
searchterm -path:/test
As mentioned in your comment, the official documentation is here. An answer on how to ignore stuff can be found here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With