Skip to main content

About content exclusions for GitHub Copilot

Learn how content exclusions for GitHub Copilot work.

この機能を使用できるユーザーについて

Repository administrators and organization owners can manage content exclusion settings.

People with the "Maintain" role for a repository can view, but not edit, content exclusion settings for that repository.

GitHub Copilot Business または GitHub Copilot Enterprise にサブスクリプションしている組織。

Note

GitHub Command Palette からのコンテンツの除外は現在パブリック ベータ版であり、変更される可能性があります。

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.

コンテンツの除外を追加または変更し、設定が既に読み込まれている IDE でこれが有効になるまでに最大で 30 分かかることがあります。 独自の IDE に変更を適用して、コンテンツの除外設定を強制的に再読み込みすることができます。 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

  • Visual Studio Code を除き、現在、コンテンツの除外は GitHub Copilot Chat ではサポートされていません。
  • Visual Studio Code の GitHub Copilot Chat と Visual Studio の Copilot Chat では、質問で @github Copilot チャット参加者を使用する場合、コンテンツの除外は適用されません。
  • 除外されていないファイルで IDE から情報が提供されている場合、Copilot が除外されたファイルのセマンティック情報を使用する可能性があります。 このようなコンテンツの例としては、コードで使用されるシンボルの型情報やカーソル定義などがあります。

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?

GitHub Copilot コンテンツの除外設定は、Copilot を使用するすべてのユーザーに適用されるわけではありません。

内容の除外設定は、GitHub Copilot Business または GitHub Copilot Enterprise サブスクリプションの一部としてシートが付与されており、内容の除外が構成されているのと同じ Organization のメンバーであるユーザーにのみ適用されます。 指定したファイルにアクセスできるその他のユーザーには、コンテンツの除外設定による影響はなく、コード補完候補が表示されます。

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