Skip to main content
我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问英文文档。如果此页面上的翻译有问题,请告诉我们
GitHub AE 目前是有限发行版。请联系我们的销售团队以了解更多信息。

About searching on GitHub

Our integrated search covers the many repositories, users, and lines of code on GitHub AE.

您可以全局搜索所有 GitHub AE,也可搜索特定仓库或组织。

  • To search globally across all of GitHub AE, type what you're looking for into the search field at the top of any page, and choose "All GitHub" in the search drop-down menu.
  • To search within a particular repository or organization, navigate to the repository or organization page, type what you're looking for into the search field at the top of the page, and press Enter.

Notes:

  • GitHub Pages sites are not searchable on GitHub AE. However you can search the source content if it exists in the default branch of a repository, using code search. For more information, see "Searching code." For more information about GitHub Pages, see "What is GitHub Pages?"
  • Currently our search doesn't support exact matching.
  • Whenever you are searching in code files, only the first two results in each file will be returned.

After running a search on GitHub AE, you can sort the results, or further refine them by clicking one of the languages in the sidebar. For more information, see "Sorting search results."

GitHub AE search uses an ElasticSearch cluster to index projects every time a change is pushed to GitHub AE. Issues and pull requests are indexed when they are created or modified.

Types of searches on GitHub

You can search for the following information across all repositories you can access on 您的企业.

Searching using a visual interface

You can search GitHub AE using the 搜索页面 (https://[hostname]/search) or 高级搜索页面(https://[hostname]/search/advanced).

The 高级搜索页面(https://[hostname]/search/advanced) provides a visual interface for constructing search queries. You can filter your searches by a variety of factors, such as the number of stars or number of forks a repository has. As you fill in the advanced search fields, your query will automatically be constructed in the top search bar.

Advanced Search

Searching repositories on GitHub.com from your private enterprise environment

If you use both GitHub.com and GitHub AE, and an enterprise owner has enabled 统一搜索, you can search across both environments at the same time from GitHub AE. For more information about how enterprise owners can enable 统一搜索, see "Enabling 统一搜索 for your enterprise."

Your enterprise owner on GitHub AE can separately enable 统一搜索 for all public repositories on GitHub.com and for private repositories owned by the organization or enterprise on GitHub.com that is connected to GitHub AE through GitHub Connect.

Before you can use 统一搜索 for private repositories, you must connect your personal accounts on GitHub.com and GitHub AE. For more information, see "Enabling GitHub.com repository search from your private enterprise environment."

When you search from GitHub AE, only private repositories that you have access to and that are owned by the connected organization or enterprise account will be included in search results. Neither you nor anyone else will be able to search private repositories owned by your personal account on GitHub.com from GitHub AE.

To limit your search to one environment, you can use a filter option on the 高级搜索页面(https://[hostname]/search/advanced) or you can use the environment: search prefix. To only search for content on GitHub AE, use the search syntax environment:local. To only search for content on GitHub.com, use environment:github.

Further reading