Show Menu
Cheatography

Github Search Syntax Cheat Sheet by

Quick Reference for Github Search Syntax

Search Syntax

Operators
Notes
<, <=, >, >=
Value compar­isons
n..*, *..n, n..n
Range compar­isons
NOT QUALIFIER

-QUALIFIER
Exclude the qualifier
"­dou­ble­-qu­ote­s"
Surrounds white-­space phrases
All query inputs are ANDed together, so "
cats dogs
" as the search input would match anywhere in the title, body or comment which had both "­cat­s" AND "­dog­s" in the match.

Dates follow ISO8601 such as (year-­mon­th-day)

Links

 

Limit Results (General)

Prefix
Qualifier
is:, type:
pr, issue, public, private
in:
title, body, comments, name, descri­ption, readme
user:, org:
NAME, @me
repo:
USER/REPO
author:
USER, app/name, @me
language:
LANG
no:
label, milestone, assignee, project
size:
size of target matches range qualifier
followers:

forks:

stars:

topics:

target matches range qualifier
topic:
matches targets which have the
topic

Code Search

Qualifier
Searches files...
path:DIRECTORY
with
DIRECTORY
in the file path
language:LANGUAGE
which are of
LANGUAGE
, see languages
size:n
which match the
n
range qualifier
filename:FILENAME
which match
FILENAME
extension:EXTENSION
which match
EXTENSION
Examples
octocat filena­me:­readme path:/
matches readme files with the word octocat that are located at the root level of a reposi­tory.
form path:c­gi-bin langua­ge:perl
matches Perl files with the word form in a cgi-bin directory, or in any of its subdir­ect­ories
Hello langua­ge:­mar­kdown -filen­ame­:readme
matches Markdown files with the word Hello excluding files named readme
       
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          C Reference Cheat Sheet

          More Cheat Sheets by cpriest

          GNU Parallel Cheat Sheet