GitHub: How to do case sensitive search for the code in repository?

Zhongjun 'Mark' Jin picture Zhongjun 'Mark' Jin · Aug 7, 2015 · Viewed 11.2k times · Source

I want to do a case sensitive search for a particular piece of code in a GitHub repository. Is it possible?

I checked https://help.github.com/articles/searching-code/ and didn't find such a syntax rule.

Answer

db48x picture db48x · Nov 16, 2015

Use grep or git grep in your local clone. The GitHub search has a lot of limitations. I think the worst of these is that it only shows the first two matches from any file, so I just avoid it whenever possible.