我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问英文文档。如果此页面上的翻译有问题,请告诉我们

Searching code for exact matches

You can search code for exact matches in a subset of repositories on GitHub.

本文内容

代码搜索中的精确匹配在测试阶段,只面向 GitHub 上有限的用户和仓库,可能会有更改。 To request access to the beta, join the waitlist.

People with read permissions to a repository can search the repository's files for exact matches.

About searching code for exact matches

您可以搜索包含任何字母、数字和符号组合的精确匹配代码。

By default, searches for exact matches are case-insensitive and will include partial matches. For example, searching for let react will return let ReactDOM. Optionally, you can refine your search to be case-sensitive or to only include results that match the entire word you've searched for.

Searching code for exact matches

Searching files within a repository for exact matches only works with some repositories. For more information, see "Supported repositories."

  1. 在 GitHub 上,导航到仓库的主页面。
  2. Press f on your keyboard to reveal the search field for exact matches.
    Exact match search field
  3. In the search field, type the string you'd like to find.
    Exact match search string
  4. Optionally, click the Options drop-down to narrow your search.
    Exact match search Options drop-down
  5. Press Enter or Return on your keyboard.
  6. 在结果列表中 ,单击要查找的文件。

Supported repositories

Participants in the beta can search files in these public repositories for exact matches.

延伸阅读

问问别人

找不到要找的内容?

联系我们