This version of GitHub Enterprise was discontinued on 2021-09-23. 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. For help with the upgrade, contact GitHub Enterprise support.

Understanding the search syntax

When searching GitHub Enterprise Server, you can construct queries that match specific numbers and words.

Query for values greater or less than another value

You can use >, >=, <, and <= to search for values that are greater than, greater than or equal to, less than, and less than or equal to another value.

QueryExample
>ncats stars:>1000 matches repositories with the word "cats" that have more than 1000 stars.
>=ncats topics:>=5 matches repositories with the word "cats" that have 5 or more topics.
<ncats size:<10000 matches code with the word "cats" in files that are smaller than 10 KB.
<=ncats stars:<=50 matches repositories with the word "cats" that have 50 or fewer stars.

You can also use range queries to search for values that are greater than or equal to, or less than or equal to, another value.

QueryExample
n..*cats stars:10..* is equivalent to stars:>=10 and matches repositories with the word "cats" that have 10 or more stars.
*..ncats stars:*..10 is equivalent to stars:<=10 and matches repositories with the word "cats" that have 10 or fewer stars.

Query for values between a range

You can use the range syntax n..n to search for values within a range, where the first number n is the lowest value and the second is the highest value.

QueryExample
n..