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 quali­fier
"­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/n­ame, @me
langu­age:
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:­DI­REC­TORY
with DIREC­TORY in the file path
langu­age­:L­ANG­UAGE
which are of LANG­UAGE, see languages
size:n
which match the n range qualifier
filen­ame­:F­ILE­NAME
which match FILE­NAME
exten­sio­n:­EXT­ENS­ION
which match EXTE­NSION
Exam­ples
octocat filena­me:­readme path:/ matches readme files with the word octo­cat 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 direct­ory, or in any of its subd­ire­cto­ries
Hello langua­ge:­mar­kdown -filen­ame­:re­adme matches Mark­down files with the word Hello exclu­ding 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