Skip to main content

This version of GitHub Enterprise Server was discontinued on 2024-07-09. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise Server. For help with the upgrade, contact GitHub Enterprise support.

Searching in forks

By default, forks are not shown in search results. You can choose to include them in repository searches, and in code searches if they meet certain criteria.

To show forks in repository search results, add fork:true or fork:only to your query. For more information, see "Searching for repositories."

Forks are only indexed for code search when they have more stars than the parent repository. You will not be able to search the code in a fork that has fewer stars than its parent. To show forks with more stars than the parent repository in code search results, add fork:true or fork:only to your query. For more information, see "Searching code."

Note: Forks can only be included in repository and code searches.

The fork:true qualifier finds all results that match your search query, including forks. The fork:only qualifier finds only forks that match your search query.

QualifierExample
fork:truegithub fork:true matches all repositories containing the word "github," including forks.
language:LANGUAGE fork:trueandroid language:java fork:true matches code with the word "android" that's written in Java, in both forks and regular repositories.
fork:onlygithub fork:only matches all fork repositories containing the word "github."
forks:>n fork:onlyforks:>500 fork:only matches repositories with more than 500 forks, and only returns those that are forks.

Further reading