Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to search for a particular filename on GitHub?

People also ask

Can I search for a word in GitHub repo?

To search within a particular repository or organization, navigate to the repository or organization page, type what you're looking for into the search field at the top of the page, and press Enter.

How do I search the contents of a file in GitHub?

Search by filename The filename qualifier matches code files with a certain filename. You can also find a file in a repository using the file finder. For more information, see "Finding files on GitHub." filename:linguist matches files named "linguist."

How do I do an advanced search on GitHub?

Searching using a visual interface You can search GitHub Enterprise Server using the search page ( https://[hostname]/search ) or advanced search page ( https://[hostname]/search/advanced ). The advanced search page ( https://[hostname]/search/advanced ) provides a visual interface for constructing search queries.


Does the search user.rb in:path do what you want to do? Alternatively there is also this search filename:user.rb

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


In search input, you can use filename parameter to search in multiple repositories, for example:

filename:my_filename.txt

If you're looking for a filename in specific repository, you can just press t and start typing the file name (see: GH keyboard shortcuts).


GitHub introduced FileFinder in 2011.

Try it out: just hit t on any repo's file or directory view.[1]

So, You're still restricted to repository.

[1]https://github.com/blog/793-introducing-the-file-finder

Another approach to Your question:

Can I use Git to search for matching filenames in a repository?


In my case, I wanted to search for a particular file name, in all of my organization's repositories. This can be done by entering this in the search box:

org:your-organization-user-name filename:the-file-name

Of course, just do "filename:the-file-name" if you want to search the whole of GitHub.

I didn't see this in https://help.github.com/articles/searching-code/ but found out when I switched context, and GitHub entered the filter for me automaticallly.