Skip to main content

Content exclusion for GitHub Copilot

You can prevent Copilot from accessing certain files.

Wer kann dieses Feature verwenden?

Organisationen und Unternehmen mit einem Copilot Business- oder Copilot Enterprise-Plan.

About content exclusion for Copilot

You can use content exclusion to configure Copilot to ignore certain files. When you exclude content from Copilot:

  • Code completion will not be available in the affected files.
  • The content in affected files will not inform code completion suggestions in other files.
  • The content in affected files will not inform GitHub Copilot Chat's responses.
  • Affected files will not be reviewed in a Copilot code review.

Who can configure content exclusion

Repository administrators, organization owners, and enterprise owners can configure content exclusion.

  • Repositoryadministratoren können nur Inhalte aus ihren eigenen Repositorys ausschließen. Das wirkt sich auf alle Copilot-Benutzer aus, die in diesen Repositorys arbeiten.

  • Organisationsbesitzer*innen können Inhalte für Benutzer*innen ausschließen, denen ein Copilot-Arbeitsplatz über ihre Organisation zugewiesen wurde.

  • Unternehmensbesitzer*innen können Ausschlussregeln auf alle Copilot-Benutzer*innen im Unternehmen anwenden.

Availability of content exclusion

The Copilot Business and Copilot Enterprise plans provide the following level of support for content exclusion.

ToolCode completion supportCopilot Chat support
Visual Studio
Visual Studio Code
JetBrains IDEs
Vim/NeovimNot applicable
Xcode
Eclipse
Azure Data StudioNot applicable
The GitHub websiteNot applicable
GitHub MobileNot applicable

Content exclusions also apply to Copilot Code Review on the GitHub website.

Hinweis

  • Content exclusion is in public preview on the GitHub website and in GitHub Mobile and is subject to change.
  • Content exclusion is currently not supported in Edit and Agent modes of Copilot Chat in Visual Studio Code.

Limitations of content exclusion

Es ist möglich, dass Copilot semantische Informationen aus einer ausgeschlossenen Datei verwenden kann, wenn die Informationen von IDE direkt bereitgestellt werden. Beispiele für solche Inhalte sind Typinformationen und Hoveroverdefinitionen für Symbole, die im Code verwendet werden, sowie allgemeine Projekteigenschaften wie Buildkonfigurationsinformationen.

Currently, content exclusions do not apply to symbolic links (symlinks).

Data sent to GitHub

After you configure content exclusion, the client (for example, the Copilot extension for VS Code) sends the current repository URL to the GitHub server so that the server can return the correct policy to the client. These URLs are not logged anywhere.

Further reading