icode icode
首页
  • Android学习

    • 📁基础内容
    • 📺AndroidCore
    • 🎨Android-UI
    • 🏖️Components
    • 📊Fragment
    • 🔗网络操作
    • 🔏异步机制
    • 📦数据存储
    • 🗃️Gradle
  • 学习笔记

    • 『框架』笔记
    • 『Kotlin』笔记
    • 《Vue》笔记
    • 《Git》学习笔记
    • 『Bug踩坑记录』
  • ListView
  • RecyclerView
  • ViewPager
  • Java笔记

    • 🟠JavaSE
    • 🟢JavaWeb
    • 🔴JavaEE
    • ⚪JavaTopic
    • 🍳设计模式
  • 计算机基础

    • 📌计算机网络
    • 🔍数据结构
    • 📦数据库
    • 💻OS
  • 技术文档
  • GitHub技巧
  • Nodejs
  • 博客搭建
  • 学习
  • 面试
  • 心情杂货
  • 实用技巧
  • 友情链接
  • 关于

    • 📫关于我
  • 收藏

    • 网站
    • 资源
    • Vue资源
  • 分类
  • 标签
  • 归档
GitHub (opens new window)

iqqcode

保持对技术的探索实践与热爱
首页
  • Android学习

    • 📁基础内容
    • 📺AndroidCore
    • 🎨Android-UI
    • 🏖️Components
    • 📊Fragment
    • 🔗网络操作
    • 🔏异步机制
    • 📦数据存储
    • 🗃️Gradle
  • 学习笔记

    • 『框架』笔记
    • 『Kotlin』笔记
    • 《Vue》笔记
    • 《Git》学习笔记
    • 『Bug踩坑记录』
  • ListView
  • RecyclerView
  • ViewPager
  • Java笔记

    • 🟠JavaSE
    • 🟢JavaWeb
    • 🔴JavaEE
    • ⚪JavaTopic
    • 🍳设计模式
  • 计算机基础

    • 📌计算机网络
    • 🔍数据结构
    • 📦数据库
    • 💻OS
  • 技术文档
  • GitHub技巧
  • Nodejs
  • 博客搭建
  • 学习
  • 面试
  • 心情杂货
  • 实用技巧
  • 友情链接
  • 关于

    • 📫关于我
  • 收藏

    • 网站
    • 资源
    • Vue资源
  • 分类
  • 标签
  • 归档
GitHub (opens new window)
  • 技术文档

  • GitHub技巧

    • GitHub高级搜索技巧
    • GitHub Actions 实现自动部署静态博客
    • GitHub Actions 定时运行代码:每天定时百度链接推送
    • GitHub加速下载项目的方法
    • Github检索技巧
      • 关键词检索
      • 其他
      • Docs
        • 按仓库名称、说明或自述文件内容搜索
        • 基于仓库的内容搜索
        • 在用户或组织的仓库内搜索
        • 按仓库大小搜索
        • 按关注者数量搜索
        • 按复刻数量搜索
        • 按星号数量搜索
        • 按仓库创建或上次更新时间搜索
        • 按语言搜索
        • 按主题搜索
        • 按主题数量搜索
        • 按许可搜索
        • 按仓库可见性搜索
        • 基于仓库是否为镜像搜索
        • 基于仓库是否已存档搜索
        • 基于具有 good first issue 或 help wanted 标签的议题数量搜索
        • 延伸阅读
        • 按交互排序
        • 按反应排序
        • 按作者日期排序
        • 按提交者日期排序
        • 按更新日期排序
  • Nodejs

  • 博客搭建

  • 技术
  • GitHub技巧
iqqcode
2021-03-18
目录

Github检索技巧

# 关键词检索

Github search docs (opens new window)

组合搜索中间用 空格 隔开

in:name example 名字中有example

in:readme example readme中有example

in:description example 描述中有example

stars:>1000 stars>1000

forks:>1000 fork>1000

pushed:>2019-09-01 2019年9月1日后有更新的

language:java 用Java编写的项目


# 其他

要找协议是最为宽松的 Apache License 2 的代码,可以这样

license:apache-2.0 spring cloud

# Docs

官方文档 📚搜索仓库 (opens new window)

提示:

  • 有关可以添加到任何搜索限定符以进一步改善结果的搜索语法列表,请参阅“了解搜索语法 (opens new window)”。
  • 对多个字词的搜索词使用引号。 例如,如果要搜索具有标签 "In progress" 的议题,可搜索 label:"in progress"。 搜索不区分大小写。

# 按仓库名称、说明或自述文件内容搜索 (opens new window)

通过 in 限定符,您可以将搜索限制为仓库名称、仓库说明、自述文件内容或这些的任意组合。 如果省略此限定符,则只搜索仓库名称和说明。

限定符 示例
in:name jquery in:name (opens new window) 匹配仓库名称中含有 "jquery" 的仓库。
in:description jquery in:name,description (opens new window) 匹配仓库名称或说明中含有 "jquery" 的仓库。
in:readme jquery in:readme (opens new window) 匹配仓库自述文件中提及 "jquery" 的仓库。
repo:owner/name repo:octocat/hello-world (opens new window) 匹配特定仓库名称。

# 基于仓库的内容搜索 (opens new window)

您可以使用 in:readme 限定符,通过搜索仓库自述文件中的内容来查找仓库。 更多信息请参阅“关于自述文件 (opens new window)”。

除了使用 in:readme 以外,无法通过搜索仓库内的特定内容来查找仓库。 要搜索仓库内的特定文件或内容,您可以使用查找器或代码特定的搜索限定符。 更多信息请参阅“在 GitHub 上查找文件 (opens new window)”和“搜索代码 (opens new window)”。

限定符 示例
in:readme octocat in:readme (opens new window) 匹配仓库自述文件中提及 "octocat" 的仓库。

# 在用户或组织的仓库内搜索 (opens new window)

要在特定用户或组织拥有的所有仓库中搜索,您可以使用 user 或 org 限定符。

限定符 示例
user:*USERNAME* user:defunkt forks:>100 (opens new window) 匹配来自 @defunkt、拥有超过 100 复刻的仓库。
org:*ORGNAME* org:github (opens new window) 匹配来自 GitHub 的仓库。

# 按仓库大小搜索 (opens new window)

size 限定符使用大于、小于和范围限定符查找匹配特定大小(以千字节为单位)的仓库。 更多信息请参阅“了解搜索语法 (opens new window)”。

限定符 示例
size:*n* size:1000 (opens new window) 匹配恰好为 1 MB 的仓库。
size:>=30000 (opens new window) 匹配至少为 30 MB 的仓库。
size:<50 (opens new window) 匹配小于 50 KB 的仓库。
size:50..120 (opens new window) 匹配介于 50 KB 与 120 KB 之间的仓库。

# 按关注者数量搜索 (opens new window)

您可以使用 followers 限定符以及大于、小于和范围限定符,基于关注仓库的用户数量过滤仓库。 更多信息请参阅“了解搜索语法 (opens new window)”。

限定符 示例
followers:*n* node followers:>=10000 (opens new window) 匹配有 10,000 或更多关注者提及文字 "node" 的仓库。
styleguide linter followers:1..10 (opens new window) 匹配拥有 1 到 10 个关注者并且提及 "styleguide linter" 一词的的仓库。

# 按复刻数量搜索 (opens new window)

forks 限定符使用大于、小于和范围限定符指定仓库应具有的复刻数量。 更多信息请参阅“了解搜索语法 (opens new window)”。

限定符 示例
forks:*n* forks:5 (opens new window) 匹配只有 5 个复刻的仓库。
forks:>=205 (opens new window) 匹配具有至少 205 个复刻的仓库。
forks:<90 (opens new window) 匹配具有少于 90 个复刻的仓库。
forks:10..20 (opens new window) 匹配具有 10 到 20 个复刻的仓库。

# 按星号数量搜索 (opens new window)

您可以使用大于、小于和范围限定符,基于仓库的星标数量来搜索仓库。 更多信息请参阅“使用星标保存仓库 (opens new window)”和“了解搜索语法 (opens new window)”。

限定符 示例
stars:*n* stars:500 (opens new window) 匹配恰好具有 500 个星号的仓库。
stars:10..20 (opens new window) 匹配具有 10 到 20 个星号、小于 1000 KB 的仓库。
stars:>=500 fork:true language:php (opens new window) 匹配具有至少 500 个星号,包括复刻的星号(以 PHP 编写)的仓库。

# 按仓库创建或上次更新时间搜索 (opens new window)

您可以基于创建时间或上次更新时间过滤仓库。 对于仓库创建,您可以使用 created 限定符;要了解仓库上次更新的时间,您要使用 pushed 限定符。 pushed 限定符将返回仓库列表,按仓库中任意分支上最近进行的提交排序。

两者均采用日期作为参数。 日期格式必须遵循 ISO8601 (opens new window)标准,即 YYYY-MM-DD(年-月-日)。 您也可以在日期后添加可选的时间信息 THH:MM:SS+00:00,以便按小时、分钟和秒进行搜索。 这是 T,随后是 HH:MM:SS(时-分-秒)和 UTC 偏移 (+00:00)。

搜索日期时,可以使用大于、小于和范围限定符来进一步筛选结果。 更多信息请参阅“了解搜索语法 (opens new window)”。

限定符 示例
created:*YYYY-MM-DD* webos created:<2011-01-01 (opens new window) 匹配具有 "webos" 字样、在 2011 年之前创建的仓库。
pushed:*YYYY-MM-DD* css pushed:>2013-02-01 (opens new window) 匹配具有 "css" 字样、在 2013 年 1 月之后收到推送的仓库。
case pushed:>=2013-03-06 fork:only (opens new window) 匹配具有 "case" 字样、在 2013 年 3 月 6 日或之后收到推送并且作为复刻的仓库。

# 按语言搜索 (opens new window)

您可以根据仓库中代码的语言搜索仓库。

限定符 示例
language:*LANGUAGE* rails language:javascript (opens new window) 匹配具有 "rails" 字样、以 JavaScript 编写的仓库。

# 按主题搜索 (opens new window)

您可以找到按特定主题分类的所有仓库。 更多信息请参阅“使用主题对仓库分类 (opens new window)”。

限定符 示例
topic:*TOPIC* topic:jekyll (opens new window)匹配已归类为 "jekyll" 主题的仓库。

# 按主题数量搜索 (opens new window)

您可以使用 topics 限定符以及大于、小于和范围限定符,根据应用于仓库的主题数量来搜索仓库。 更多信息请参阅“使用主题对仓库分类 (opens new window)”和“了解搜索语法 (opens new window)”。

限定符 示例
topics:*n* topics:5 (opens new window) 匹配具有五个主题的仓库。
topics:>3 (opens new window) 匹配超过三个主题的仓库。

# 按许可搜索 (opens new window)

您可以根据仓库中许可的类型搜索仓库。 您必须使用许可关键字,按特定许可或许可系列来过滤仓库。 更多信息请参阅“许可仓库 (opens new window)”。

限定符 示例
license:*LICENSE_KEYWORD* license:apache-2.0 (opens new window) 匹配根据 Apache License 2.0 授权的仓库。

# 按仓库可见性搜索 (opens new window)

您可以根据仓库的可见性过滤搜索。 更多信息请参阅“关于仓库可见性 (opens new window)”。

| 限定符 | 示例 | ------------- | ------------- | | is:public | is:public org:github (opens new window) 匹配 GitHub 拥有的公共仓库。 | is:internal | is:internal test (opens new window) 匹配您可以访问并且包含单词 "test" 的内部仓库。 | is:private | is:private pages (opens new window) 匹配您可以访问并且包含单词 "pages" 的私有仓库。

# 基于仓库是否为镜像搜索 (opens new window)

您可以根据仓库是否为镜像以及托管于其他位置托管来搜索仓库。 更多信息请参阅“寻找在 GitHub 上参与开源项目的方法 (opens new window)”。

限定符 示例
mirror:true mirror:true GNOME (opens new window) 匹配是镜像且包含 "GNOME" 字样的仓库。
mirror:false mirror:false GNOME (opens new window) 匹配并非镜像且包含 "GNOME" 字样的仓库。

# 基于仓库是否已存档搜索 (opens new window)

您可以基于仓库是否已存档来搜索仓库。 更多信息请参阅“关于存档仓库 (opens new window)”。

限定符 示例
archived:true archived:true GNOME (opens new window) 匹配已存档且包含 "GNOME" 字样的仓库。
archived:false archived:false GNOME (opens new window) 匹配未存档且包含 "GNOME" 字样的仓库。

# 基于具有 good first issue 或 help wanted 标签的议题数量搜索 (opens new window)

您可以使用限定符 help-wanted-issues:>n 和 good-first-issues:>n 搜索具有最少数量标签为 help-wanted 或 good-first-issue 议题的仓库。 更多信息请参阅“通过标签鼓励对项目做出有益的贡献 (opens new window)”。

限定符 示例
good-first-issues:>n good-first-issues:>2 javascript (opens new window) 匹配具有超过两个标签为 good-first-issue 的议题且包含 "javascript" 字样的仓库。
help-wanted-issues:>n help-wanted-issues:>4 react (opens new window) 匹配具有超过四个标签为 help-wanted 的议题且包含 "React" 字样的仓库。

# 延伸阅读 (opens new window)

  • “排序搜索结果 (opens new window)”
  • “在复刻中搜索 (opens new window)”

# 排序搜索结果

您可以使用 Sort(排序)菜单或通过将 sort 限定符添加到查询来排序 GitHub 搜索结果。

使用 Sort(排序)菜单可按相关性、星号数量、复刻数量以及项目最近更新时间来排序结果。

repo-search-sort

要按交互、反应、作者日期、提交者日期或项目最近更新时间来排序,您可以将 sort 限定符添加到搜索查询。

# 按交互排序 (opens new window)

sort:interactions 限定符按最高反应和评论总数排序。

限定符 示例
sort:interactions 或 sort:interactions-desc org:github sort:interactions (opens new window) 匹配 GitHub 所拥有仓库中的议题,按最高反应和评论总数排序。
sort:interactions-asc org:github sort:interactions-asc (opens new window) 匹配 GitHub 所拥有仓库中的议题,按最低反应和评论总数排序。

# 按反应排序 (opens new window)

sort:reactions 限定符按反应数量或类型排序。

限定符 示例
sort:reactions 或 sort:reactions-desc org:github sort:reactions (opens new window) 匹配 GitHub 所拥有仓库中的议题,按最高反应数量排序。
sort:reactions-asc org:github sort:reactions-asc (opens new window) 匹配 GitHub 所拥有仓库中的议题,按反应数量升序排序(最少到最多)。
sort:reactions-*reaction* org:github sort:reactions-+1 (opens new window) 匹配 GitHub 所拥有仓库中的议题,按最多赞成 (👍) 反应数排序。
org:github sort:reactions--1 (opens new window) 匹配 GitHub 所拥有仓库中的议题,按最多不赞成 (👎) 反应数排序。
org:github sort:reactions-smile (opens new window) 匹配 GitHub 所拥有仓库中的议题,按最多大笑 (😄) 反应数排序。
org:github sort:reactions-tada (opens new window) 匹配 GitHub 所拥有仓库中的议题,按最多欢呼 (🎉) 反应数排序。
org:github sort:reactions-heart (opens new window) 匹配 GitHub 所拥有仓库中的议题,按最多红心 (❤️) 反应数排序。

# 按作者日期排序 (opens new window)

sort:author-date 限定符按作者日期降序或升序排序。

限定符 示例
sort:author-date 或 sort:author-date-desc feature org:github sort:author-date (opens new window) 匹配 GitHub 所拥有仓库中含有 "feature" 字样的提交,按作者日期降序排序。
sort:author-date-asc feature org:github sort:author-date-asc (opens new window) 匹配 GitHub 所拥有仓库中含有 "feature" 字样的提交,按作者日期升序排序。

# 按提交者日期排序 (opens new window)

sort:committer-date 限定符按提交者日期降序或升序排序。

限定符 示例
sort:committer-date 或 sort:committer-date-desc feature org:github sort:committer-date (opens new window) 匹配 GitHub 所拥有仓库中含有 "feature" 字样的提交,按提交者日期降序排序。
sort:committer-date-asc feature org:github sort:committer-date-asc (opens new window) 匹配 GitHub 所拥有仓库中含有 "feature" 字样的提交,按提交者日期升序排序。

# 按更新日期排序 (opens new window)

sort:updated 限定符按项目最近更新日期排序。

限定符 示例
sort:updated 或 sort:updated-desc feature sort:updated (opens new window) 匹配含有 "feature" 字样的仓库,按最近更新日期排序。
sort:updated-asc feature sort:updated-asc (opens new window) 匹配含有 "feature" 字样的仓库,按最远更新日期排序。

# 在复刻中搜索

默认情况下,forks 不会在搜索结果中显示。 如果复刻满足特定条件,您可以选择在仓库搜索以及在代码搜索中包括它们。

要在仓库搜索 (opens new window)结果中显示复刻,请将 fork:true 或 fork:only 添加到查询。

仅当复刻具有比父仓库更多的星号时,才会为代码搜索 (opens new window)编索引。 您无法在比父项具有更少星号的复刻中搜索代码。 要在代码搜索结果中显示比父仓库具有更多星号的复刻,请将 fork:true 或 fork:only 添加到查询。

fork:true 限定符查找匹配搜索查询的所有结果,包括复刻。 fork:only 限定符仅查找匹配搜索查询的复刻。

限定符 示例
fork:true github fork:true (opens new window) 匹配包含 "github" 字样的所有仓库,包括复刻。
android language:java fork:true (opens new window) 匹配复刻和普通仓库中包含 "android" 字样、以 Java 编写的代码。
fork:only github fork:only (opens new window) 匹配包含 "github" 字样的所有复刻仓库。
forks:>500 fork:only (opens new window) 匹配具有超过 500 个复刻的仓库,并且只返回作为复刻的仓库。
编辑 (opens new window)
上次更新: 2021/06/28, 14:52:28
GitHub加速下载项目的方法
nodejs递归读取所有文件

← GitHub加速下载项目的方法 nodejs递归读取所有文件→

最近更新
01
匿名内部类
10-08
02
函数式接口
10-08
03
ARouter-Kotlin踩坑
10-05
更多文章>
Theme by Vdoing | Copyright © 2021-2023 iqqcode | MIT License | 备案号-京ICP备2021028793号
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式
×