参考链接
Searching wikis for Github
使用标签(关键字)查询
Use quotations around multi-word search terms. For example, if you want to search for issues with the label “In progress,” you’d search for label:“in progress”. Search is not case sensitive.
在多个单词搜索词中使用引号。例如,如果你想去搜索针对issues为in progress时,你可以搜索
label:"in progress"。搜索是不区分大小写的。
官方文档中多次提到wiki应该是指你所需要查找的知识吧,因为有类似维基百科的这种收集知识的网站。
user and org qualifier
searching wikis within user’s or organizaion’s respositories在用户或者组织的仓库的中搜索
| Qualifier 限定词 | Example |
|---|---|
| user | user:defunkt matches wiki pages from repositories owned by @defunkt. user:defunkt将匹配用户为Defunkt的wiki页面 |
| org | org:github matches wikis in repositories owned by the GitHub organization.org:github将匹配组织为Github的wikis |
| repo | repo:defunkt/gibberish matches wiki pages from @defunkt’s “gibberish” repository.repo:defunkt/gibberish将从用户@defunkt匹配名为”gibberish”的仓库 |
Search within a wiki page title or body text 搜索标题和文本内容
The
inqualifier limits the search to the wiki page title or body text. Without the qualifier, both the title and body text are searched.in限定词限制搜索为标题和内容中的文体。没有限制词,标题和内容文本都会被搜索。
| Qualifier 限定词 | Example |
|---|---|
| in | usage in:title matches wiki page titles with the word “usage.” usage in:title 匹配单词为“usage”的标题 |
| in | installation in:body matches wiki pages with the word “installation” in their main body text. installation in:body 匹配单词为“installation”的主要内容文本。 |
Search by last updated date
The
updatedqualifier matches wiki pages that were last updated within the specified date range.updated限定词匹配在指定日期内被更新的wiki页面
| Qualifier 限定词 | Example |
|---|---|
| updated | usage updated:>2016-01-01 matches wiki pages with the word “usage” that were last updated after 2016-01-01. usage updated:>2016-01-01 匹配单词为”usage”并且上次更新时间为2016-01-01的wiki页面 |
findingfiles in Github在github中查询文件
- File finder results exclude some directories like
build,log,tmp, andvendor. To search for files within these directories, use the[filename](https://help.github.com/en/articles/searching-code#search-by-filename)code search qualifier.文件查询器结果不包含一些路径名,像“build”,“log”,“tmp”和“vendor”。在这些路径中查询文件,使用“
[filename](https://help.github.com/en/articles/searching-code#search-by-filename)code search qualifier”
- You can also open the file finder by pressing
ton your keyboard. For more information, see “Keyboard shortcuts.”你也可以通过按“t”键,打开文件查询器。针对更多信息,请查询Keyboard shortcuts
- 在Github中,进入主页面
- 在你的仓库名下,点击Find File。

- 在输入框查询输入你想查询的文件名

- 在结果清单中点击你想查找的文件
Sorting search results对搜索结果排序
最基本的排序方式

Sort by interactions按照互动数排序
| 限定词 | Example |
|---|---|
| sort | org Invalid repository. ("repo" attributte must be in the format "owner/repo") sort |
| sort | org Invalid repository. ("repo" attributte must be in the format "owner/repo") sort |
Sort by reactions 仅按照反响数排序
| 限定词 | Example |
|---|---|
| sort | **org Invalid repository. ("repo" attributte must be in the format "owner/repo") sort |
| sort | org Invalid repository. ("repo" attributte must be in the format "owner/repo") sort |
| sort | org Invalid repository. ("repo" attributte must be in the format "owner/repo") sort:reactions-+1匹配组织为github的仓库issues, 以最多点赞 (👍) reactions排序 |
| org Invalid repository. ("repo" attributte must be in the format "owner/repo") sort | |
| org Invalid repository. ("repo" attributte must be in the format "owner/repo") sort | |
| org Invalid repository. ("repo" attributte must be in the format "owner/repo") sort | |
| org Invalid repository. ("repo" attributte must be in the format "owner/repo") sort |
Sort by author date以作者日期排序
| 限定词 | Example |
|---|---|
| sort | feature org Invalid repository. ("repo" attributte must be in the format "owner/repo") sort |
| sort | feature org Invalid repository. ("repo" attributte must be in the format "owner/repo") sort |
Sort by committer date按提交者日期排序
| 限定词 | Example |
|---|---|
| sort | feature org Invalid repository. ("repo" attributte must be in the format "owner/repo") sort |
| sort | “**feature org Invalid repository. ("repo" attributte must be in the format "owner/repo") sort |
Sort by updated date 按更新日期排序
| 限定词 | Example |
|---|---|
| sort | feature sort |
| sort | **feature sort |
Searching for respository
你通过拼接任意的修饰符去搜索仓库
You can search for repositories globally across all of GitHub, or search for repositories within a particular organization. For more information, see “About searching on GitHub.”你可以在Github中全局搜索仓库,或在一个特定组织中搜索仓库,针对更多信息,请查看”About searching on GitHub.”
To include forks in the search results, you will need to add
fork:trueorfork:onlyto your query. For more information, see “Searching in forks.”在搜索结果包含forks,你需要添加fork:true和fork:only到你查询中,针对更多信息,请查看Searching in forksFor a list of search syntaxes that you can add to any search qualifier to further improve your results, see “Understanding the search syntax”.搜索语法清单,你可以添加搜索修饰符去进一步改善你的搜索结果。查看”Understanding the search syntax”
Use quotations around multi-word search terms. For example, if you want to search for issues with the label “In progress,” you’d search for
label:"in progress". Search is not case sensitive.使用引号包含多个单词搜索项。例如,如果你想从标签为“In progress”去搜索issues,你可以使用“label:"in progress"”,搜索不区分大小写。
search by respository name,description,content of readme file通过仓库名、描述、README文件内容搜索
| Qualifier | Example |
|---|---|
| in | jquery in |
| in | jquery in |
| in | jquery in |
| repo | repo |
Search based on the contents of a repository基于仓库内容搜索
你可以“in
除了“in
| Qualifier | Example |
|---|---|
| in | octocat in |
Search within a user’s or organization’s repositories在用户或者组织的仓库中搜索
你可以通过“user”或者“org”修饰符,来搜索用户或者组织所拥有的仓库
| Qualifier | Example |
|---|---|
| user | user |
| org | org Invalid repository. ("repo" attributte must be in the format "owner/repo") matches repositories from GitHub.匹配组织为Github的仓库 |
Search by repository size通过仓库大小搜索
“size”修饰符查询仓库可以匹配指定的大小(千字节),使用greater than, less than, and range qualifiers.
| Qualifier | Example |
|---|---|
| size | size:1000 matches repositories that are 1 MB exactly.匹配刚好为1MB(1000字节)的仓库 |
| size:>=30000 matches repositories that are at least 30 MB.匹配至少30MB的仓库 | |
| size:<50 matches repositories that are smaller than 50 KB.匹配小于50KB的仓库 | |
| size:50..120 matches repositories that are between 50 KB and 120 KB.匹配50KB到120KB之间的仓库 |
Search by number of followers搜索粉丝大小
你可以过滤基于粉丝大小的仓库,使用greater than, less than, and range qualifiers的“followers”修饰符
| Qualifier | Example |
|---|---|
| followers | node followers:>=10000 matches repositories with 10,000 or more followers mentioning the word “node”.匹配粉丝大于10000并且有提到过node这个单词的仓库 |
| styleguide linter followers:1..10 matches repositories with between 1 and 10 followers, mentioning the word “styleguide linter.”匹配粉丝数量1到10之间的并且有提到过“styleguide linter”单词的仓库 |
Search by number of forks通过forks数量搜索
| Qualifier | Example |
|---|---|
| forks | forks:5 matches repositories with only five forks.匹配只有5个forks的仓库 |
| forks:>=205 matches repositories with at least 205 forks.匹配至少205个forks的仓库 | |
| forks:<90 matches repositories with fewer than 90 forks.匹配小于90forks的仓库 | |
| forks:10..20 matches repositories with 10 to 20 forks.匹配10到20个Forks的仓库 |
Search by number of stars通过star数搜索
| Qualifier | Example |
|---|---|
| stars | stars:500 matches repositories with exactly 500 stars.匹配刚好500个star的仓库 |
| stars:10..20 matches repositories 10 to 20 stars, that are smaller than 1000 KB. 匹配10到20个Star的仓库,仓库比1000KB小 | |
| stars:>=500 fork |
Search by when a repository was created or last updated通过仓库被创建或者最后一次更新来搜索
You can filter repositories based on time of creation or time of last update. For repository creation, you can use the
createdqualifier; to find out when a repository was last updated, you’ll want to use thepushedqualifier. Thepushedqualifier will return a list of repositories, sorted by the most recent commit made on any branch in the repository.
你可以过滤仓库基于创建时间或者上次更新时间。针对仓库创建,你可以使用
created修饰符;你可以使用pushed修饰符查出一个上次更新时间的仓库,pushed修饰符将返回一个仓库清单,清单以近期最多的提交分类(包含分支)。Both take a date as a parameter. Date formatting must follow the ISO8601 standard, which is
YYYY-MM-DD(year-month-day). You can also add optional time informationTHH:MM:SS+00:00after the date, to search by the hour, minute, and second. That’sT, followed byHH:MM:SS(hour-minutes-seconds), and a UTC offset (+00:00).两个修饰符以date作为参数。date格式化必须根据 ISO8601 标准,例如
YYYY-MM-DD(年-月-日)。你也可以添加可选的时间信息THH:MM:SS+00:00在date后,这可以通过时分秒去查询。T遵循HH:MM:SS和 UTC偏移量(+00:00).
| Qualifier | Example |
|---|---|
| created:YYYY-MM-DDpushed | webos created:<2011-01-01 matches repositories with the word “webos” that were created before 2011.查询仓库时间为2011年之前,并且有“webos”单词的仓库 |
| css pushed:>2013-02-01 matches repositories with the word “css” that were pushed to after January 2013.匹配2013年1月后提交的,并且有“css”单词的仓库。 | |
| case pushed:>=2013-03-06 fork |
Search by language通过语言搜索
| Qualifier | Example |
|---|---|
| language | rails language |
Search by topic通过话题搜索
| Qualifier | Example |
|---|---|
| topic | topic |
Search by number of topics 以话题的数量来搜索
| Qualifier | Example |
|---|---|
| topics | topics:5 matches repositories that have five topics. |
| topics:>3 matches repositories that have more than three topics. |
Search by license 通过开源许可证搜索
| Qualifier | Example |
|---|---|
| license | license |
Search by public or private repository通过私有和公共的仓库进行
| Qualifier | Example |
|---|---|
| is | is Invalid repository. ("repo" attributte must be in the format "owner/repo") matches repositories owned by GitHub that are public. |
| is | is |
Search based on whether a repository is a mirror以仓库是否为镜像来搜索
| Qualifier | Example |
|---|---|
| mirror | mirror |
| mirror | mirror |
Search based on whether a repository is archived搜索仓库是否归档
| Qualifier | Example |
|---|---|
| archived | archived |
| archived | archived |
Search based on number of issues with good first issue or help wanted labels 基于good first issue和help wanted的issues数量
| Qualifier | Example |
|---|---|
| good-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-issues:>n | help-wanted-issues:>4 react matches repositories with more than four issues labeled help-wanted and that contain the word “React.” |
exclude keywords to search
您可以使用 NOT 语法排除包含特定字词的结果。 NOT 运算符只能用于字符串关键词, 不适用于数字或日期。
| 查询 | 示例 |
|---|---|
| NOT | hello NOT world 匹配含有 “hello” 字样但不含有 “world” 字样的仓库。 |
缩小搜索结果范围的另一种途径是排除特定的子集。 您可以为任何搜索限定符添加 - 前缀,以排除该限定符匹配的所有结果。
| 查询 | 示例 |
|---|---|
| -QUALIFIER | cats stars:>10 -language |
| mentions Invalid repository. ("repo" attributte must be in the format "owner/repo") 匹配提及 @defunkt 且不在 GitHub 组织仓库中的议题 |