In short.
This GitHub guide explains repository indexing for developers and Copilot administrators, with the catch that indexing non-GitHub repositories uploads workspace data to GitHub and has platform and policy limits. It describes how semantic search finds code by meaning, how Chat conversations trigger indexing, and how the cloud agent uses search automatically. GitHub says initial indexing can take up to 60 seconds for a large repository and subsequent updates typically arrive within seconds of starting a new conversation. The page also states that indexed repositories are not used for model training. Pricing, retention terms and measured answer quality are unknown from this page; runtime behavior was not tested.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete documentation page at [https://docs.github.com/api/article/body?pathname=/en/copilot/concepts/prompting-and-context/repository-indexing], including its indexing timings, supported surfaces, no-training statement, GitHub.com-only notice for non-GitHub indexing, upload and policy requirements, and Copilot Chat content-exclusion behavior. Linked pages about Chat, the cloud agent, administrative policies and content exclusions are excluded. No installation, indexing, Copilot interaction, data-flow inspection or performance measurement was executed; runtime behavior remains unassessed.
The overview
identity
Indexing repositories for GitHub Copilot is GitHub documentation explaining a feature of Copilot, rather than a separate indexing tool. It covers Copilot Chat in GitHub and Visual Studio Code, semantic search in the Copilot cloud agent, and additional conditions for repositories hosted outside GitHub.
The source address is [https://docs.github.com/api/article/body?pathname=/en/copilot/concepts/prompting-and-context/repository-indexing].
assessment
The guide is useful for understanding how Copilot finds repository context and what administrators must enable for non-GitHub workspaces. Its most consequential distinction is that indexing those workspaces uploads data to GitHub. It provides operational expectations, but no measured comparison of indexed and unindexed answers.
users
Developers asking questions about a repository's structure or logic can use this guide to understand how Copilot retrieves relevant code. Cloud-agent users can learn why searches may work without exact file names or symbols. Organization and enterprise owners get specific guidance about enabling non-GitHub indexing and applying content exclusions for managed Copilot seats.
capabilities
Semantic code search locates relevant code by meaning, which helps when a question does not contain the exact names used in the repository. GitHub describes this as improving answers about code structure and logic and helping the cloud agent locate relevant code.
A repository index can serve Copilot Chat in GitHub and Visual Studio Code and the Copilot cloud agent. GitHub states there is no limit to how many repositories can be indexed; the page does not establish limits on repository size or file coverage.
Using it
requirements
Automatic Chat indexing requires a conversation with repository context. For non-GitHub repositories, the documented route is semantic indexing of workspace files in Visual Studio Code, including GitLab-hosted and local repositories.
Non-GitHub indexing is available on GitHub.com, not GHE.com or GitHub Enterprise Server. It is disabled by default. For Copilot Business or Copilot Enterprise organizations, an organization or enterprise owner must explicitly enable the Semantic indexing for non-GitHub repositories policy; leaving it Unconfigured keeps the feature unavailable. The page does not provide a complete eligibility matrix for other plans.
mechanism
Starting a Copilot Chat conversation with repository context triggers background indexing. Semantic retrieval then helps supply relevant code for answers. The cloud agent uses semantic code search automatically when appropriate, without separate search configuration.
GitHub says initial indexing can take up to 60 seconds for a large repository. After the first index, re-indexing is much quicker, and the index typically incorporates recent changes within seconds of starting a new conversation. These are documented expectations, not measurements supplied by the page.
setup
For Chat, start a conversation with the intended repository in context in GitHub or Visual Studio Code; the page says indexing begins automatically. Allow for the initial background indexing period before judging whether repository context is useful.
For managed non-GitHub workspaces in Visual Studio Code, first have an organization or enterprise owner enable the named policy. The page links to administrative instructions but does not include their interface steps or a troubleshooting procedure.
example
With a repository in context, ask Copilot Chat: "How does this repo manage HTTP requests and responses?" GitHub says Chat can reference relevant code sections to explain the repository's structure and logic. This illustrates a question that can benefit from semantic retrieval without naming a specific function or file. The page provides no resulting answer or measured outcome.
Assessment & evidence
limitations
The page does not specify supported file types, maximum repository size, indexing failure behavior or how to inspect index completeness. It supplies no accuracy benchmark or guarantee that an answer finds every relevant part of the code.
Non-GitHub indexing has explicit hosting and administrative restrictions. The content-exclusion explanation specifically concerns Copilot Chat, so it does not establish the cloud agent's treatment of excluded content.
reasoning
The described behavior suggests a useful fit for developers exploring unfamiliar repositories, where they know the behavior they want to understand but not its implementation names. Automatic indexing reduces manual search setup, while background indexing introduces a possible wait for fresh context.
For non-GitHub repositories, teams requiring all code processing to remain local would need another approach because this feature uploads workspace data. These fit judgments follow from the documented mechanism; they do not establish answer accuracy or performance.
alternatives
The page contrasts semantic retrieval with exact text searches using tools such as grep. As a practical inference, exact search can help when a developer already knows a symbol or text pattern, while semantic retrieval can help when only the intended behavior is known. The page does not compare other assistants, local indexing tools or competing search systems.
evidence
GitHub's documentation directly supports the descriptions of automatic indexing, supported Copilot surfaces, non-GitHub uploads, administrative restrictions and the no-training statement. It contains an illustrative question but no benchmark, execution trace, sample answer or independent validation. Runtime behavior and answer quality were not tested.
Access & freshness
costs
Pricing is unknown from this page. It names Copilot Business and Copilot Enterprise for administrative controls but gives no subscription prices, indexing charges, usage allowances or billing treatment. The statement that repository count is unlimited does not establish that access is free or that all other usage is unlimited.
rights
GitHub states that indexed repositories will not be used for model training. That statement does not mean processing stays local: the non-GitHub workspace feature explicitly uploads data to GitHub.
Business and Enterprise owners can define content exclusions for managed seats. If an excluded repository has a semantic index, data is filtered according to that policy before being passed to Copilot Chat. Retention and deletion terms, documentation redistribution rights, and equivalent exclusion behavior for the cloud agent are not established by this page.
freshness
The documentation was captured on 15 November 2026. The supplied page does not state a publication date, last-update date or applicable Copilot and Visual Studio Code versions. Its timing and platform-support statements describe that captured text; subsequent changes are unknown.
actions
Start with a repository-specific architecture question in Copilot Chat and compare the answer with the code it references. Allow for initial indexing, and start a new conversation when checking whether recent changes are reflected.
Before enabling non-GitHub indexing, confirm that uploading workspace data to GitHub fits the project's requirements and that the supported platform and administrative policy conditions are met. For managed Chat users, check the applicable content exclusions. Obtain separate information about pricing, retention and cloud-agent exclusions if those affect adoption.
