GitHub hidden search features

I think that GitHub has one of the worst code search engines out there. It’s harsh but as the premier home for open source, I’d expect better.

You can’t use wildcards in GitHub search. Bummer.

While you can’t do that, there are some power features of their search that are fairly well hidden.

https://help.github.com/articles/searching-code/

Advanced search operators

  • language:go
  • fork:false
  • extension:pm
  • size:>10000
  • octocat in:file Matches code where “octocat” appears in the file contents.
  • octocat in:path Matches code where “octocat” appears in the path name.
  • octocat in:file,path Matches code where “octocat” appears in the file contents or the path name.

Some examples

  • form path:cgi-bin language:perl
  • extension:sh fork:false httpd proc stat -filename:xcache.sh