Skip to main content

About content exclusions for GitHub Copilot

Learn how content exclusions for GitHub Copilot work.

Wer kann dieses Feature verwenden?

Repositoryadministratoren und Organisationsbesitzer können Inhaltsausschlusseinstellungen verwalten.

Personen mit der Rolle "Verwalten" für ein Repository können Inhaltsausschlusseinstellungen für dieses Repository anzeigen, aber nicht bearbeiten.

Organisationen mit einem Abonnement für GitHub Copilot Business oder GitHub Copilot Enterprise.

Note

Inhalte von GitHub Copilot auszuschließen liegt derzeit als öffentliche Betaversion vor und kann noch geändert werden.

You can configure GitHub Copilot to ignore certain files by excluding specific paths to content in the settings for your repository or organization.

When you specify content exclusions, there are up to three effects depending on the level of support for your IDE:

  • 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.

Nachdem dem Hinzufügen oder Ändern von Inhaltsausschlüssen kann es bis zu 30 Minuten dauern, bis sie in IDEs wirksam wird, in denen die Einstellungen bereits geladen wurden. Sie können Änderungen auf Ihre eigene IDE anwenden, indem Sie das erneute Laden der Einstellungen für Inhaltsausschlüsse erzwingen. See "Testing changes to content exclusions in your IDE."

Availability of content exclusions

ToolCode completion supportCopilot Chat support
Visual Studio
Visual Studio Code
JetBrains IDEs
Vim/NeovimNot applicable
Azure Data StudioNot applicable
GitHub.comNot applicable

Limitations of content exclusions

  • In Copilot Chat in Visual Studio Code werden Inhaltsausschlüsse nicht angewendet, wenn Sie den @github Chatteilnehmer in Ihrer Frage verwenden.
  • Es ist möglich, dass Copilot semantische Informationen aus einer ausgeschlossenen Datei verwenden kann, wenn die Informationen von der IDE in einer nicht ausgeschlossenen Datei bereitgestellt werden. Beispiele für solche Inhalte sind Typinformationen und Hover-Over-Definitionen für im Code verwendete Symbole.

What can you exclude?

When you specify content exclusion in the settings for a repository, you can only exclude files in that repository.

When you specify content exclusion in the settings for an organization, you can exclude files in any Git-based repository hosted on GitHub.com, or anywhere that can be accessed using any of the following syntaxes:

http[s]://host.xz[:port]/path/to/repo.git/

git://host.xz[:port]/path/to/repo.git/

[user@]host.xz:path/to/repo.git/

ssh://[user@]host.xz[:port]/path/to/repo.git/

Who is affected by a content exclusion setting?

Eine Einstellung für den Inhaltsausschluss gilt nur für Personen, die jedem der folgenden Kriterien entsprechen:

  • Sie haben einen Platz als Teil eines GitHub Copilot Business oder GitHub Copilot Enterprise Abonnements erhalten
  • Sie sind Mitglieder derselben Organisation in dem der Inhaltsausschluss konfiguriert ist

Alle anderen Personen, die auf die angegebenen Dateien zugreifen können, sehen weiterhin Codeabschlussvorschläge und GitHub Copilot Chat-Antworten, die auf die angegebenen Dateien verweisen.

All exclusions, whether they are defined in repository settings or in organization settings, apply to all members of the organization who have been granted a Copilot seat as part of a Copilot Business subscription.

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.

Next steps

To set up content exclusions in your repository or organization, see "Configuring content exclusions for GitHub Copilot."