
GitHub Search Cheatsheet
All the GitHub search qualifiers in an easy to read list.
Published:
(updated: )
Using this Cheatsheet
- This cheat sheet is meant to be easy to skim and find what you're looking for. If you want more detailed descriptions and examples, please refer to GitHub's official documentation.
- Terms written in ALL CAPS are custom variables that you will need to type yourself.
Table of Contents
- Search Syntax (Other sections depend on understanding this)
- Issues and Pull Requests
- Issues only
- PRs only
- Code
- Repos
- Users
- Commits
- Discussions
- Wikis
- Forks
- Topics
- Packages
Search Syntax
Syntax | Matches |
---|---|
N |
a number |
>N |
greater than N |
>=N |
greater than or equal to N |
<N |
less than N |
<=N |
less than or equal to N |
N..* |
the same as >=N |
*..N |
the same as <=N |
N1..N2 |
between N1 and N2 |
YYYY-MM-DD |
a date |
>YYYY-MM-DD |
later than YYYY-MM-DD |
>=YYYY-MM-DD |
later than or on YYYY-MM-DD |
<YYYY-MM-DD |
earlier than YYYY-MM-DD |
<=YYYY-MM-DD |
earlier than or on YYYY-MM-DD |
YYYY-MM-DD..YYYY-MM-DD |
between YYYY-MM-DD and YYYY-MM-DD |
YYYY-MM-DD..* |
the same as >YYYY-MM-DD |
*..YYYY-MM-DD |
the same as <YYYY-MM-DD |
YYYY-MM-DDTHH:MM:SS+HH:MM |
Date and time along with UTC offset (timezones). Can be used in place of YYYY-MM-DD |
YYYY-MM-DDTHH:MM:SSZ |
same as YYYY-MM-DDTHH:MM:SS+00:00 |
NOT QUERY |
you can pre-pend NOT to a QUERY to exclude it from results |
-QUALIFIER |
a - preceding any qualifier will exclude it from results |
@me |
can be used in place of a USERNAME to match your own account |
Issues & Pull Requests (PRs)
These qualifiers apply to both issues and PRs. If you want to search only issues or only PRs, use type:issue
or
type:pr
.
Qualifier | Matches |
---|---|
type:issue |
only issues |
is:issue |
Same as type:issue |
type:pr |
only PRs |
is:pr |
Same as type:pr |
state:open |
open issues and PRs |
is:open |
Same as state:open |
state:closed |
closed issues and PRs |
is:closed |
Same as state:closed |
QUERY in:title |
titles containing the specified QUERY |
QUERY in:body |
bodies containing the specified QUERY |
QUERY in:comments |
comments containing the specified QUERY |
is:public |
in public repos |
is:private |
in private repos |
author:USERNAME |
created by USERNAME |
author:app/USERNAME |
created by an "integration account" USERNAME |
assignee:USERNAME |
assigned to USERNAME |
mentions:USERNAME |
mentions @USERNAME |
team:ORGNAME/TEAMNAME |
mentions @ORGNAME/TEAMNAME |
commenter:USERNAME |
containing comment from USERNAME |
involves:USERNAME |
where USERNAME is the author, assignee, a commenter, or they are mentioned |
label:LABEL |
has the specified LABEL |
milestone:MILESTONE |
in the specified milestone |
project:PROJECT_BOARD |
in the project |
project:REPOSITORY/PROJECT_BOARD |
in the project in the repo |
language:LANGUAGE |
in repos using LANGUAGE (programming language) |
comments:N |
has N comments (e.g. >100) |
interactions:N |
has N interactions (e.g. >1200) |
reactions:N |
has N reactions (e.g. <500) |
created:YYYY-MM-DD |
created during specified date (e.g <2022-02-02) |
updated:YYYY-MM-DD |
updated during specified date (e.g >2022-02-02) |
closed:YYYY-MM-DD |
closed during specified date (e.g <=2022-02-02) |
archived:true |
in a repo that has been archived |
archived:false |
not in a repo that has been archived |
is:locked |
conversation is locked |
is:unlocked |
conversation is not locked |
no:label |
has no labels |
no:milestone |
has no milestone |
no:assignee |
has no assignee |
no:project |
has no project |
Issues Only
Qualifier | Matches |
---|---|
reason:complete |
closed as "completed" |
reason:"not planned" |
closed as "not planned" |
linked:pr |
is linked to a PR |
-linked:pr |
is not linked to a PR |
Pull Requests Only
Qualifier | Matches |
---|---|
linked:issue |
is linked to an issue |
-linked:issue |
is not linked to an issue |
status:pending |
has pending status |
status:success |
has success status |
status:failure |
has failure status |
SHA |
PR with commit SHA that starts with entered search term |
head:HEAD_BRANCH |
opened from branch names beginning with HEAD_BRANCH |
base:BASE_BRANCH |
being merged into BASE_BRANCH |
draft:true |
draft PRs |
draft:false |
non-draft PRs (available to be reviewed) |
review:none |
has not been reviewed |
review:required |
requires a review before it can be merged |
review:approved |
has been approved by a reviewer |
review:changes_requested |
a reviewer has requested changed before merging |
reviewed-by:USERNAME |
has been reviewed by USERNAME |
review-requested:USERNAME |
has a request for USERNAME to review |
user-review-requested:@me |
you have been asked to review |
team-review-requested:TEAMNAME |
TEAMNAME has been asked to review |
merged:YYYY-MM-DD |
merged during specified date (e.g >=2022-02-02) |
is:merged |
has been merged |
is:unmerged |
has not been merged |
Code
Qualifier | Matches |
---|---|
QUERY in:file |
QUERY appears in the file contents |
QUERY in:path |
QUERY appears in the file path |
user:USERNAME |
committed by USERNAME |
org:ORGNAME |
owned by ORGNAME |
repo:USERNAME/REPOSITORY |
is in the repo named USERNAME/REPOSITORY |
path:/ |
located at the root level of a repo |
path:DIRECTORY |
located within DIRECTORY or any of it's subdirectories |
language:LANGUAGE |
written in the programming language LANGUAGE |
size:N |
file size matches N in bytes (e.g. >10000) |
filename:FILENAME |
file is named FILENAME |
extension:EXTENSION |
has the file extension EXTENSION |
Repos
Qualifier | Matches |
---|---|
QUERY in:name |
has QUERY in the repo name |
QUERY in:description |
has QUERY in the repo description |
QUERY in:topics |
is labeled with QUERY as a topic. |
QUERY in:readme |
has QUERY in the README file |
repo:OWNER/NAME |
name is OWNER/NAME |
user:USERNAME |
repos owned by USERNAME |
org:ORGNAME |
repos owned by ORGNAME |
size:N |
repos that are size N kilobytes in size (e.g. >1000) |
followers:N |
repo with N followers |
forks:N |
has N forks |
stars:N |
has N stars |
created:YYYY-MM-DD |
created on YYYY-MM-DD (e.g. <2021-03-02) |
pushed:YYYY-MM-DD |
has commit pushed on YYYY-MM-DD (e.g. >2022-01-01) |
language:LANGUAGE |
written in the programming language of LANGUAGE |
topic:TOPIC |
has a topic of TOPIC |
topics:N |
has N topics |
license:LICENSE_KEYWORD |
is licensed under LICENSE_KEYWORD (list of license keywords) |
is:public |
is public |
is:private |
is private |
mirror:true |
repos that are mirrors |
mirror:false |
repos that are not mirrors |
archived:true |
is archived |
archived:false |
is not archived |
good-first-issues:>n |
has N or more issues labeled good-first-issue |
help-wanted-issues:>n |
has N or more issues labelled help-wanted |
is:sponsorable |
repo owners have a GitHub Sponsors profile |
has:funding-file |
has a FUNDING.yml file |
Users
Qualifier | Matches |
---|---|
type:user |
only personal accounts |
type:org |
only organizations |
user:USERNAME |
user with the username USERNAME |
org:ORGNAME |
organization with the name ORGNAME |
QUERY in:login |
users with the QUERY in their username |
QUERY in:name |
users whose real name contains QUERY |
fullname:FIRSTNAME LASTNAME |
user with the full name FIRSTNAME LASTNAME |
QUERY in:email |
users with QUERY in their email. |
repos:N |
users with N repositories (e.g. >100) |
location:LOCATION |
users that specified LOCATION as their location in their profile |
language:LANGUAGE |
users with a majority of their repos written in LANGUAGE |
created:YYYY-MM-DD |
users that joined on YYYY-MM-DD |
followers:N |
users with N followers |
is:sponsorable |
users and organizations who have a GitHub Sponsors profile |
Commits
Qualifier | Matches |
---|---|
author:USERNAME |
commits authored by USERNAME |
committer:USERNAME |
committed by USERNAME |
author-name:NAME |
commits with NAME in the author name |
committer-name:NAME |
commits with NAME in the committer name. |
author-email:EMAIL |
authored by EMAIL |
committer-email:EMAIL |
committed by EMAIL |
author-date:YYYY-MM-DD |
commits authored on YYYY-MM-DD |
committer-date:YYYY-MM-DD |
commits committed on YYYY-MM-DD |
merge:true |
merge commits |
merge:false |
non-merge commits |
hash:HASH |
commits with the hash of HASH |
parent:HASH |
children of commits with the hash of HASH |
tree:HASH |
commits that refer to the tree hash of HASH. |
user:USERNAME |
commits in repositories owned by USERNAME |
org:ORGNAME |
commits in repositories owned by ORGNAME |
repo:USERNAME/REPO |
commits in the repository USERNAME/REPO |
is:public |
commits to public repositories |
is:private |
commits to private repositories |
Discussions
Qualifier | Matches |
---|---|
QUERY in:title |
discussions with QUERY in the title |
QUERY in:body |
discussions with QUERY in the body |
QUERY in:comments |
discussions with QUERY in the comments |
user:USERNAME |
in repos owned by USERNAME |
org:ORGNAME |
discussions in repos owned by ORGNAME |
repo:USERNAME/REPOSITORY |
discussions in the USERNAME/REPOSITORY repo |
is:public |
in public repos |
is:private |
in private repos |
author:USERNAME |
discussions created by USERNAME |
commenter:USERNAME |
discussons commented on by USERNAME |
involves:USERNAME |
discussions involving USERNAME |
comments:N |
discussions with N comments |
created:YYYY-MM-DD |
discussions created on YYYY-MM-DD |
updated:YYYY-MM-DD |
discussions updated on YYYY-MM-DD |
Wikis
Qualifier | Matches |
---|---|
user:USERNAME |
wiki in repos owned by USERNAME |
org:ORGNAME |
in repos owned by ORGNAME |
repo:USERNAME/REPOSITORY |
wiki pages in the USERNAME/REPOSITORY repo |
QUERY in:title |
wiki pages with titles containing QUERY |
QUERY in:body |
wiki pages with body text containing QUERY |
updated:YYYY-MM-DD |
wikis updated on YYYY-MM-DD |
Forks
Qualifier | Matches |
---|---|
QUERY fork:true |
Repos and forks that contain QUERY |
QUERY fork:only |
only forks that contain QUERY |
Topics
Qualifier | Matches |
---|---|
is:curated |
topics that are curated |
is:featured |
topics that are featured on https://github.com/topics/ |
is:not-curated |
topics that are not curated |
is:not-featured |
topics that are not featured on https://github.com/topics/ |
repositories:N |
topics that have N repos |
created:YYYY-MM-DD |
topics created on YYYY-MM-DD |
Packages
Qualifier | Matches |
---|---|
user:USERNAME |
packages owned USERNAME |
org:ORGNAME |
packages owned by ORGNAME |
is:public |
public packages |
is:private |
private packages |