Can I filter files in a GitHub repository by file content?
For example, there is the public repo:
https://github.com/xamarin/mobile-samples.
I know that I can find file by name using this option:
https://github.com/xamarin/mobile-samples/find/master
But, can I filter results to files containing specified text eg. "Entry"?
Is there some query-string which I can use to do that?
I mean something like this: https://github.com/xamarin/mobile-samples?content=entry
Select to search in current repository, not "All GitHub". It will display all "Entry" in particular file. Just to add a little something: the syntax seems to be <search term> filename:<filename> and you may search for it in your organization only (by adding org:<your organization name> .
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). This is the correct answer.
Searching in Your Git RepoYou can search for a commit or any particular string.
state the specific string you're looking for using the "intext:" search operator. add the programming language you're interested in, using the "ext:" operator (i.e. "ext:py", "ext:R", "ext:rb", etc.) search in all public repos in Github using the "site:" operator mrgloom mentioned.
Just open repository, go to top search bar (where you search for other repos) and type:
Entry
Select to search in current repository, not "All GitHub".
To search for term in particular file of repository type:
Entry filename:example_filename.java
It will display all "Entry" in particular file.
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