How to do advanced searches on Github?

Asked

Viewed 550 times

1

You can build custom operators/queries in Github search?

Github provides the advanced search through a GUI, but also, as there are searches advanced Google (site:, cache:, etc...), it is possible to do the same by searching for specific files and directories?

This can surely be useful for any developer, taking as example third party codes according to your custom search.

  • 1

    https://github.com/search/advanced here you will find all the available search options.

  • Yes, but not by searching for parameters. I’m seeing how it is faster to effect searches through "operators".

  • In fact, try to type anything in any field of this link that I gave you that will appear what you want in the field of search ;)

  • Yes, it adds common operators, but not advanced ones like filename: and filepath:.

2 answers

2

After some research I found how this can be done.

It is possible to search for specific files, dates, directories, among many other forms of search. See below some examples:

filepath:app/models filename:user.rb

The filepath will seek by the exact path in all publicly hosted projects on Github. And the filename by file name.

Find more information about advanced searches search-syntax and Searching-code.

2


All research inline that you can do:

  • user
  • repo
  • created
  • language
  • stars
  • forks
  • size
  • pushed
  • fork
  • extension
  • size
  • path
  • state
  • comments
  • label
  • author
  • mentions
  • assignee
  • updated
  • fullname
  • location
  • followers
  • repos
  • updated
  • fork

Browser other questions tagged

You are not signed in. Login or sign up in order to post.