Github 搜索语法大全

搜索语法限制

  • Queries longer than 256 characters are not supported
  • You can't construct a query using more than five AND, OR, or NOT operators

 

参考

Searching for repositories

限定符示例说明
in

jquery in:name

jquery in:name,description

jquery in:readme

搜索名字中包含关键字的信息

所搜名字或描述中包含关键字的信息

搜索readme中包含关键字的信息

useruser: USERNAME根据用户名进行搜索
orgorg: ORGNAME org:github matches repositories from GitHub.
sizesize: n size:1000 matches repositories that are 1 MB exactly.
size:>=30000 matches repositories that are at least 30 MB.
size:<50 matches repositories that are smaller than 50 KB.
size:50..120 matches repositories that are between 50 KB and 120 KB.
forksforks: n forks:5 matches repositories with only five forks.
forks:>=205 matches repositories with at least 205 forks.
forks:<90 matches repositories with fewer than 90 forks.
forks:10..20 matches repositories with 10 to 20 forks.
starsstars: n stars:500 matches repositories with exactly 500 stars.
stars:10..20 matches repositories 10 to 20 stars, that are smaller than 1000 KB.
stars:>=500 fork:true language:php matches repositories with the at least 500 stars, including forked ones, that are written in PHP.
created created: YYYY-MM-DD webos created:<2011-01-01 matches repositories with the word "webos" that were created before 2011.
pushed pushed: YYYY-MM-DD

css pushed:>2013-02-01 matches repositories with the word "css" that were pushed to after January 2013.

case pushed:>=2013-03-06 fork:only matches repositories with the word "case" that were pushed to on or after March 6th, 2013, and that are forks.

languagelanguage: LANGUAGE rails language:javascript matches repositories with the word "rails" that are written in JavaScript.
topic

topic: TOPIC

topics: n

topic:jekyll matches repositories that have been classified with the topic "jekyll."

topics:5 matches repositories that have five topics.

topics:>3 matches repositories that have more than three topics.

licenselicense: LICENSE_KEYWORD license:apache-2.0 matches repositories that are licensed under Apache License 2.0.
is

is:public

is:private

is:public org:github matches repositories owned by GitHub that are public.

is:private pages matches private repositories you have access to and that contain the word "pages."

mirror

mirror:true

mirror:false

mirror:true GNOME matches repositories that are mirrors and contain the word "GNOME."

mirror:false GNOME matches repositories that are not mirrors and contain the word "GNOME."

achieved

archived:true

archived:false

archived:true GNOME matches repositories that are archived and contain the word "GNOME."

archived:false GNOME matches repositories that are not archived and contain the word "GNOME."

good-first-issuesgood-first-issues:>n

good-first-issues:>2 javascript matches repositories with more than two issues labeled good-first-issue and that contain the word "javascript."

 

help-wanted-issueshelp-wanted-issues:>nhelp-wanted-issues:>4 react matches repositories with more than four issues labeled help-wanted and that contain the word "React."

 

 

 

Searching code

QualifierExample
in:fileoctocat in:file matches code where "octocat" appears in the file contents.
in:pathoctocat in:path matches code where "octocat" appears in the file path.
 octocat in:file,path matches code where "octocat" appears in the file contents or the file path.
user: USERNAME user:defunkt extension:rb matches code from @defunkt that ends in .rb .
org: ORGNAME org:github extension:js matches code from GitHub that ends in .js .
repo: USERNAME/REPOSITORY repo:mozilla/shumway extension:as matches code from @mozilla's shumway project that ends in .as .
path:/ octocat filename:readme path:/ matches readme files with the word "octocat" that are located at the root level of a repository.
path: DIRECTORY form path:cgi-bin language:perl matches Perl files with the word "form" in a cgi-bin directory, or in any of its subdirectories.
path: PATH/TO/DIRECTORY console path:app/public language:javascript matches JavaScript files with the word "console" in an app/public directory, or in any of its subdirectories (even if they reside in app/public/js/form-validators ).
language: LANGUAGE element language:xml size:100 matches code with the word "element" that's marked as being XML and has exactly 100 bytes.
 display language:scss matches code with the word "display," that's marked as being SCSS.
 org:mozilla language:markdown matches code from all @mozilla's repositories that's marked as Markdown.
size: n function size:>10000 language:python matches code with the word "function," written in Python, in files that are larger than 10 KB.
filename: FILENAME filename:linguist matches files named "linguist."
 filename:.vimrc commands matches .vimrc files with the word "commands."
 filename:test_helper path:test language:ruby matches Ruby files named test_helper within the test directory.
extension: EXTENSION form path:cgi-bin extension:pm matches code with the word "form," under cgi-bin , with the .pm file extension.
 icon size:>200000 extension:css matches files larger than 200 KB that end in .css and have the word "icon."

Searching users

QualifierExample
type:usermike in:name created:<2011-01-01 type:user matches personal accounts named "mike" that were created before 2011.
type:orgdata in:email type:org matches organizations with the word "data" in their email.
in:loginkenya in:login matches users with the word "kenya" in their username.
in:fullnamebolton in:fullname matches users whose real name contains the word "bolton."
in:emaildata in:email matches users with the word "data" in their email.
repos: n repos:>9000 matches users whose repository count is over 9,000.
 bert repos:10..30 matches users with the word "bert" in their username or real name who own 10 to 30 repositories.
location: LOCATION repos:1 location:iceland matches users with exactly one repository that live in Iceland.
language: LANGUAGE language:javascript location:russia matches users in Russia with a majority of their repositories written in JavaScript.
 jenny language:javascript in:fullname matches users with JavaScript repositories whose full name contains the word "jenny."
created: YYYY-MM-DD created:<2011-01-01 matches users that joined before 2011.
 created:>=2013-05-11 matches users that joined at or after May 11th, 2013.
 created:2013-03-06 location:london matches users that joined on March 6th, 2013, who list their location as London.
 created:2010-01-01..2011-01-01 john in:login matches users that joined between 2010 and 2011 with the word "john" in their username.
followers: n followers:>=1000 matches users with 1,000 or more followers.
 sparkle followers:1..10 matches users with between 1 and 10 followers, with the word "sparkle" in their name.

 

未完待续...

  • 4
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

阿雷由

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值