Skip to main content

이 버전의 GitHub Enterprise는 다음 날짜에 중단되었습니다. 2024-09-25. 중요한 보안 문제에 대해서도 패치 릴리스가 이루어지지 않습니다. 더 뛰어난 성능, 향상된 보안, 새로운 기능을 위해 최신 버전의 GitHub Enterprise Server로 업그레이드합니다. 업그레이드에 대한 도움말은 GitHub Enterprise 지원에 문의하세요.

GitHub 검색 정보

GitHub의 통합 검색은 GitHub Enterprise Server의 여러 리포지토리, 사용자, 코드 줄에서 검색할 수 있습니다.

About searching on GitHub

You can search globally across all of GitHub Enterprise Server, or scope your search to a particular repository or organization.

  • To search globally across all of GitHub Enterprise Server, type what you're looking for into the search field at the top of any page, and choose "Search all of GitHub" in the search dropdown 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:

  • You must be signed into a personal account on GitHub Enterprise Server to search for code across all public repositories.
  • GitHub Pages sites are not searchable on GitHub Enterprise Server. 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 "About 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 Enterprise Server, 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 Enterprise Server search uses an ElasticSearch cluster to index projects every time a change is pushed to GitHub Enterprise Server. 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 GitHub.

Searching using a visual interface

In addition to the search bar, you can search GitHub Enterprise Server using the search page (https://[hostname]/search) or advanced search page (https://[hostname]/search/advanced).

The advanced search page (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 page. Top search bar holds "kittens user:octocat" query. Under "Advanced options", "From these owners" text box holds term "octocat".

Searching repositories on GitHub.com from your private enterprise environment

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

Your enterprise owner on GitHub Enterprise Server can separately enable unified search 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 Enterprise Server through GitHub Connect.

Before you can use unified search for private repositories, you must connect your personal accounts on GitHub.com and GitHub Enterprise Server. For more information, see "Enabling repository search across environments."

When you search from GitHub Enterprise Server, 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 Enterprise Server.

To limit your search to one environment, you can use a filter option on the advanced search page (https://[hostname]/search/advanced) or you can use the environment: search prefix. To only search for content on GitHub Enterprise Server, use the search syntax environment:local. To only search for content on GitHub.com, use environment:github.

Further reading