Fundamentals 21 min read

Comprehensive Guide to GitHub Search Syntax and Techniques

This article provides a detailed overview of GitHub's advanced search capabilities, including sorting options, repository, code, user, and topic search qualifiers, with numerous examples and practical tips for developers to locate and rank results effectively.

Selected Java Interview Questions
Selected Java Interview Questions
Selected Java Interview Questions
Comprehensive Guide to GitHub Search Syntax and Techniques

GitHub's search functionality goes beyond simple keyword matching and supports a rich set of qualifiers and sorting options.

The information below is based on the official GitHub documentation (https://docs.github.com/en).

2. Sorting Search Results

2.1. Sort by Interactions

Syntax

Example

org:github sort:interactions

Match issues in GitHub-owned repositories and sort by the highest combined number of reactions and comments.

org:github sort:interactions-asc

Match issues in GitHub-owned repositories and sort by the lowest combined number of reactions and comments.

2.2. Sort by Reactions

Syntax

Example

org:github sort:reactions

Match issues in GitHub-owned repositories and sort by the highest number of reactions.

org:github sort:reactions-asc

Sort by reaction count in ascending order (fewest to most).

org:github sort:reactions-+1

Sort by the most +1 (👍) reactions.

org:github sort:reactions--1

Sort by the most -1 (👎) reactions.

org:github sort:reactions-smile

Sort by the most smile (😄) reactions.

org:github sort:reactions-tada

Sort by the most celebration (🎉) reactions.

org:github sort:reactions-heart

Sort by the most heart (❤️) reactions.

2.3. Sort by Author Date

Syntax

Example

org:github sort:author-date feature

Match commits containing the word "feature" and sort by author date descending.

org:github sort:author-date-asc feature

Match commits containing the word "feature" and sort by author date ascending.

2.4. Sort by Committer Date

Syntax

Example

org:github sort:committer-date

Match commits containing the word "feature" and sort by committer date descending.

org:github sort:committer-date-asc

Match commits containing the word "feature" and sort by committer date ascending.

2.5. Sort by Updated Date

Syntax

Example

sort:updated feature

Match repositories containing "feature" and sort by most recent update.

sort:updated-asc feature

Match repositories containing "feature" and sort by oldest update first.

3. Search Scope

3.1. Search Repositories

3.1.1. By Repository Name, Description, or README

Syntax

Example

in:name jquery

Match repositories with "jquery" in the name.

in:description jquery

Match repositories with "jquery" in the description.

in:readme jquery

Match repositories whose README mentions "jquery".

3.1.2. Within a User or Organization's Repositories

Syntax

Example

user:defunkt forks:>100

Match repositories owned by user "defunkt" with more than 100 forks.

3.1.3. By Repository Size

Syntax

Example

size:1000

Match repositories of exactly 1 MB.

size:>=30000

Match repositories of at least 30 MB.

size:<50

Match repositories smaller than 50 KB.

size:50…120

Match repositories between 50 KB and 120 KB.

3.1.4. By Fork Count

Syntax

Example

forks:5

Match repositories with exactly five forks.

forks:>=205

Match repositories with at least 205 forks.

forks:<90

Match repositories with fewer than 90 forks.

forks:10…20

Match repositories with 10 to 20 forks.

3.1.5. By Star Count

Syntax

Example

stars:500

Match repositories with exactly 500 stars.

stars:10…20

Match repositories with 10 to 20 stars.

stars:>=500 fork:true language:php

Match repositories with at least 500 stars, that are forks, and written in PHP.

3.1.6. By Creation or Last Update Time

Syntax

Example

webos created:<2011-01-01

Match repositories containing "webos" created before 2011.

css push:>2013-02-01

Match repositories containing "css" pushed after February 1 2013.

case push:>=2013-03-06 fork:only

Match repositories containing "case" pushed on or after March 6 2013 that are forks.

3.1.7. By Language

Syntax

Example

rails language:javascript

Match repositories with the word "rails" written in JavaScript.

3.1.8. By Topic

Syntax

Example

topic:jekyll

Match repositories classified under the topic "jekyll".

3.1.9. By Number of Topics

Syntax

Example

topic:5

Match repositories with exactly five topics.

topic:>3

Match repositories with more than three topics.

3.1.10. By License

Syntax

Example

license:apache-2.0

Match repositories licensed under Apache 2.0.

3.1.11. By Repository Visibility

Syntax

Example

is:public org:github

Match public repositories owned by GitHub.

is:internal test

Match internal repositories you can access that contain the word "test".

is:private pages

Match private repositories you can access that contain the word "pages".

3.1.12. By Mirror Status

Syntax

Example

mirror:true GNOME

Match repositories that are mirrors and contain "GNOME".

mirror:false GNOME

Match repositories that are not mirrors but contain "GNOME".

3.2. Search Topics

3.2.1. Narrow Search with Topic Qualifiers

Syntax

Example

is:curated javascript

Match curated topics that contain "javascript".

is:featured javascript

Match featured topics on https://github.com/topics/ that contain "javascript".

is:not-curated javascript

Match topics without extra info (e.g., description or logo) that contain "javascript".

is:not-featured javascript

Match topics that are not featured and contain "javascript".

repositories:>5000

Match topics with more than 5 000 repositories.

3.3. Search Code

3.3.1. By File Content or Path

Syntax

Example

octocat in:file

Match code where the file content contains "octocat".

octocat in:path

Match code where the file path contains "octocat".

3.3.2. In a User or Organization's Repositories

Syntax

Example

user:defunkt extension:rb

Match Ruby files (.rb) in repositories owned by @defunkt.

org:github extension:js

Match JavaScript files (.js) in repositories owned by GitHub.

repo:mozilla/shumway extension:as

Match ActionScript files (.as) in the Mozilla/Shumway project.

3.3.3. By Language

Syntax

Example

element language:xml size:100

Match XML files of exactly 100 bytes containing the word "element".

display language:scss

Match SCSS code containing the word "display".

org:mozilla language:markdown

Match Markdown code in any Mozilla repository.

3.3.4. By File Size

Syntax

Example

function size:>10000 language:python

Match Python files larger than 10 KB that contain the word "function".

3.3.5. By Filename

Syntax

Example

filename:linguist

Match files named "linguist".

filename:.vimrc commands

Match .vimrc files that contain the word "commands".

3.4. Search Users

3.4.1. By Account Name, Full Name, or Public Email

Syntax

Example

user:octocat

Match a user with the username "octocat".

org:electron type:users

Match accounts belonging to the Electron organization.

kenya in:login

Match users whose login contains "kenya".

bolton in:name

Match users whose real name contains "bolton".

fullname:Nat Friedman

Match a user with the full name "Nat Friedman" (space‑sensitive).

data in:email

Match users whose public email contains "data".

3.4.2. By Number of Repositories Owned

Syntax

Example

repos:>9000

Match users with more than 9 000 repositories.

bert repos:10…30

Match users whose name or real name contains "bert" and who own 10 to 30 repositories.

3.4.3. By Account Creation Date

Syntax

Example

created:<2011-01-01

Match users who joined before 2011.

created:>=2013-05-11

Match users who joined on or after May 11 2013.

created:2013-03-06 location:london

Match users who joined on March 6 2013 and list London as their location.

created:2010-01-01…2011-01-01 john in:login

Match users who joined between 2010 and 2011 and have "john" in their username.

3.4.4. By Follower Count

Syntax

Example

followers:>=1000

Match users with 1 000 or more followers.

sparkle follower:1…10

Match users with 1 to 10 followers whose name contains "sparkle".

Backend Exclusive Technical Group

Build a high‑quality technical community; developers, recruiting HR, and anyone willing to share internal referrals are welcome to join and help each other improve.

Civilized discussion should focus on 交流技术 , 职位内推 , and 行业探讨 .

Advertisers are not allowed; do not trust private messages to avoid scams.

Add me as a friend and I will invite you to the group.

GitHubSearchRepositorySyntaxdevelopercode
Selected Java Interview Questions
Written by

Selected Java Interview Questions

A professional Java tech channel sharing common knowledge to help developers fill gaps. Follow us!

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.