{"meta":{"title":"GitHub Copilotからコンテンツを除外する","intro":"Copilotが特定のコンテンツにアクセスできないようにする方法について説明します。","product":"GitHub Copilot","breadcrumbs":[{"href":"/ja/copilot","title":"GitHub Copilot"},{"href":"/ja/copilot/how-tos","title":"方法"},{"href":"/ja/copilot/how-tos/configure-content-exclusion","title":"コンテンツの除外を設定する"},{"href":"/ja/copilot/how-tos/configure-content-exclusion/exclude-content-from-copilot","title":"Copilotからコンテンツを除外する"}],"documentType":"article"},"body":"# GitHub Copilotからコンテンツを除外する\n\nCopilotが特定のコンテンツにアクセスできないようにする方法について説明します。\n\n## リポジトリのコンテンツ除外の構成\n\nリポジトリ設定を使用して、 GitHub Copilot が無視する必要があるリポジトリ内のコンテンツを指定できます。\n\n> \\[!NOTE]\n> GitHub Copilot CLI IDE の Copilot Chat のエージェント モードでは、コンテンツの除外はサポートされていません。 これらの Copilot 機能の詳細については、「 [GITHUB COPILOT CLI について](/ja/copilot/concepts/agents/copilot-cli/about-copilot-cli) 」および [「AUTOTITLE](/ja/copilot/how-tos/chat-with-copilot/chat-in-ide)」を参照してください。\n\n1. GitHub で、リポジトリのメイン ページに移動します。\n\n2. リポジトリ名の下にある **<svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-gear\" aria-label=\"gear\" role=\"img\"><path d=\"M8 0a8.2 8.2 0 0 1 .701.031C9.444.095 9.99.645 10.16 1.29l.288 1.107c.018.066.079.158.212.224.231.114.454.243.668.386.123.082.233.09.299.071l1.103-.303c.644-.176 1.392.021 1.82.63.27.385.506.792.704 1.218.315.675.111 1.422-.364 1.891l-.814.806c-.049.048-.098.147-.088.294.016.257.016.515 0 .772-.01.147.038.246.088.294l.814.806c.475.469.679 1.216.364 1.891a7.977 7.977 0 0 1-.704 1.217c-.428.61-1.176.807-1.82.63l-1.102-.302c-.067-.019-.177-.011-.3.071a5.909 5.909 0 0 1-.668.386c-.133.066-.194.158-.211.224l-.29 1.106c-.168.646-.715 1.196-1.458 1.26a8.006 8.006 0 0 1-1.402 0c-.743-.064-1.289-.614-1.458-1.26l-.289-1.106c-.018-.066-.079-.158-.212-.224a5.738 5.738 0 0 1-.668-.386c-.123-.082-.233-.09-.299-.071l-1.103.303c-.644.176-1.392-.021-1.82-.63a8.12 8.12 0 0 1-.704-1.218c-.315-.675-.111-1.422.363-1.891l.815-.806c.05-.048.098-.147.088-.294a6.214 6.214 0 0 1 0-.772c.01-.147-.038-.246-.088-.294l-.815-.806C.635 6.045.431 5.298.746 4.623a7.92 7.92 0 0 1 .704-1.217c.428-.61 1.176-.807 1.82-.63l1.102.302c.067.019.177.011.3-.071.214-.143.437-.272.668-.386.133-.066.194-.158.211-.224l.29-1.106C6.009.645 6.556.095 7.299.03 7.53.01 7.764 0 8 0Zm-.571 1.525c-.036.003-.108.036-.137.146l-.289 1.105c-.147.561-.549.967-.998 1.189-.173.086-.34.183-.5.29-.417.278-.97.423-1.529.27l-1.103-.303c-.109-.03-.175.016-.195.045-.22.312-.412.644-.573.99-.014.031-.021.11.059.19l.815.806c.411.406.562.957.53 1.456a4.709 4.709 0 0 0 0 .582c.032.499-.119 1.05-.53 1.456l-.815.806c-.081.08-.073.159-.059.19.162.346.353.677.573.989.02.03.085.076.195.046l1.102-.303c.56-.153 1.113-.008 1.53.27.161.107.328.204.501.29.447.222.85.629.997 1.189l.289 1.105c.029.109.101.143.137.146a6.6 6.6 0 0 0 1.142 0c.036-.003.108-.036.137-.146l.289-1.105c.147-.561.549-.967.998-1.189.173-.086.34-.183.5-.29.417-.278.97-.423 1.529-.27l1.103.303c.109.029.175-.016.195-.045.22-.313.411-.644.573-.99.014-.031.021-.11-.059-.19l-.815-.806c-.411-.406-.562-.957-.53-1.456a4.709 4.709 0 0 0 0-.582c-.032-.499.119-1.05.53-1.456l.815-.806c.081-.08.073-.159.059-.19a6.464 6.464 0 0 0-.573-.989c-.02-.03-.085-.076-.195-.046l-1.102.303c-.56.153-1.113.008-1.53-.27a4.44 4.44 0 0 0-.501-.29c-.447-.222-.85-.629-.997-1.189l-.289-1.105c-.029-.11-.101-.143-.137-.146a6.6 6.6 0 0 0-1.142 0ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM9.5 8a1.5 1.5 0 1 0-3.001.001A1.5 1.5 0 0 0 9.5 8Z\"></path></svg> \\[Settings]** をクリックします。 \\[設定] タブが表示されない場合は、 **\\[<svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-kebab-horizontal\" aria-label=\"More\" role=\"img\"><path d=\"M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z\"></path></svg>]** ドロップダウン メニューを選び、 **\\[設定]** をクリックします。\n\n   ![タブを示すリポジトリ ヘッダーのスクリーンショット。 \\[設定\\] タブが濃いオレンジ色の枠線で強調表示されています。](/assets/images/help/repository/repo-actions-settings.png)\n\n3. サイドバーの \\[Code, planning, and automation]\\(コード、計画、自動化) の下で、 \\[ **<svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-copilot\" aria-label=\"copilot\" role=\"img\"><path d=\"M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z\"></path><path d=\"M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z\"></path></svg>Copilot** ] をクリックし、\\[ **コンテンツの除外**] をクリックします。\n\n   リポジトリが親 organization から、または同じ Enterprise 内の organization から除外を継承している場合、ページの上部に、これらの除外の詳細を含む灰色のボックスが 1 つ以上表示されます。 これらの設定は編集できません。\n\n4. \\[このリポジトリで除外するパス] の下のボックスに、 Copilot を除外するファイルへのパスを入力します。\n\n   各パスを別々の行にして、形式 `- \"/PATH/TO/DIRECTORY/OR/FILE\"` を使用します。 行頭を `#` にすることで、コメントを追加できます。\n\n   > \\[!TIP] fnmatch パターン マッチング表記を使用して、ファイル パスを指定できます。 パターンでは大文字と小文字が区別されません。 ruby-doc.org ドキュメントの「[ファイル](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch)」を参照してください。\n\n### リポジトリ設定で指定されたパスの例\n\n```yaml annotate\n# Ignore the `/src/some-dir/kernel.rs` file in this repository.\n- \"/src/some-dir/kernel.rs\"\n\n# Ignore files called `secrets.json` anywhere in this repository.\n- \"secrets.json\"\n\n# Ignore all files whose names begin with `secret` anywhere in this repository.\n- \"secret*\"\n\n# Ignore files whose names end with `.cfg` anywhere in this repository.\n- \"*.cfg\"\n\n# Ignore all files in or below the `/scripts` directory of this repository.\n- \"/scripts/**\"\n```\n\n## Organization のコンテンツ除外の構成\n\n組織の設定を使用して、 GitHub Copilot が無視する必要があるファイルを指定できます。 ファイルは、Git リポジトリ内、または Git の管理下にないファイル システム上の任意の場所に配置できます。\n\n1. GitHub の右上隅にあるプロフィール画像をクリックしてから、**\\[<svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-organization\" aria-label=\"organization\" role=\"img\"><path d=\"M1.75 16A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0h8.5C11.216 0 12 .784 12 1.75v12.5c0 .085-.006.168-.018.25h2.268a.25.25 0 0 0 .25-.25V8.285a.25.25 0 0 0-.111-.208l-1.055-.703a.749.749 0 1 1 .832-1.248l1.055.703c.487.325.779.871.779 1.456v5.965A1.75 1.75 0 0 1 14.25 16h-3.5a.766.766 0 0 1-.197-.026c-.099.017-.2.026-.303.026h-3a.75.75 0 0 1-.75-.75V14h-1v1.25a.75.75 0 0 1-.75.75Zm-.25-1.75c0 .138.112.25.25.25H4v-1.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 .75.75v1.25h2.25a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25ZM3.75 6h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5ZM3 3.75A.75.75 0 0 1 3.75 3h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 3 3.75Zm4 3A.75.75 0 0 1 7.75 6h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 7 6.75ZM7.75 3h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5ZM3 9.75A.75.75 0 0 1 3.75 9h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 3 9.75ZM7.75 9h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5Z\"></path></svg> Your organizations]** をクリックします。\n\n2. 組織をクリックして選択します。\n\n3. Organization 名の下で、**\\[<svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-gear\" aria-label=\"gear\" role=\"img\"><path d=\"M8 0a8.2 8.2 0 0 1 .701.031C9.444.095 9.99.645 10.16 1.29l.288 1.107c.018.066.079.158.212.224.231.114.454.243.668.386.123.082.233.09.299.071l1.103-.303c.644-.176 1.392.021 1.82.63.27.385.506.792.704 1.218.315.675.111 1.422-.364 1.891l-.814.806c-.049.048-.098.147-.088.294.016.257.016.515 0 .772-.01.147.038.246.088.294l.814.806c.475.469.679 1.216.364 1.891a7.977 7.977 0 0 1-.704 1.217c-.428.61-1.176.807-1.82.63l-1.102-.302c-.067-.019-.177-.011-.3.071a5.909 5.909 0 0 1-.668.386c-.133.066-.194.158-.211.224l-.29 1.106c-.168.646-.715 1.196-1.458 1.26a8.006 8.006 0 0 1-1.402 0c-.743-.064-1.289-.614-1.458-1.26l-.289-1.106c-.018-.066-.079-.158-.212-.224a5.738 5.738 0 0 1-.668-.386c-.123-.082-.233-.09-.299-.071l-1.103.303c-.644.176-1.392-.021-1.82-.63a8.12 8.12 0 0 1-.704-1.218c-.315-.675-.111-1.422.363-1.891l.815-.806c.05-.048.098-.147.088-.294a6.214 6.214 0 0 1 0-.772c.01-.147-.038-.246-.088-.294l-.815-.806C.635 6.045.431 5.298.746 4.623a7.92 7.92 0 0 1 .704-1.217c.428-.61 1.176-.807 1.82-.63l1.102.302c.067.019.177.011.3-.071.214-.143.437-.272.668-.386.133-.066.194-.158.211-.224l.29-1.106C6.009.645 6.556.095 7.299.03 7.53.01 7.764 0 8 0Zm-.571 1.525c-.036.003-.108.036-.137.146l-.289 1.105c-.147.561-.549.967-.998 1.189-.173.086-.34.183-.5.29-.417.278-.97.423-1.529.27l-1.103-.303c-.109-.03-.175.016-.195.045-.22.312-.412.644-.573.99-.014.031-.021.11.059.19l.815.806c.411.406.562.957.53 1.456a4.709 4.709 0 0 0 0 .582c.032.499-.119 1.05-.53 1.456l-.815.806c-.081.08-.073.159-.059.19.162.346.353.677.573.989.02.03.085.076.195.046l1.102-.303c.56-.153 1.113-.008 1.53.27.161.107.328.204.501.29.447.222.85.629.997 1.189l.289 1.105c.029.109.101.143.137.146a6.6 6.6 0 0 0 1.142 0c.036-.003.108-.036.137-.146l.289-1.105c.147-.561.549-.967.998-1.189.173-.086.34-.183.5-.29.417-.278.97-.423 1.529-.27l1.103.303c.109.029.175-.016.195-.045.22-.313.411-.644.573-.99.014-.031.021-.11-.059-.19l-.815-.806c-.411-.406-.562-.957-.53-1.456a4.709 4.709 0 0 0 0-.582c-.032-.499.119-1.05.53-1.456l.815-.806c.081-.08.073-.159.059-.19a6.464 6.464 0 0 0-.573-.989c-.02-.03-.085-.076-.195-.046l-1.102.303c-.56.153-1.113.008-1.53-.27a4.44 4.44 0 0 0-.501-.29c-.447-.222-.85-.629-.997-1.189l-.289-1.105c-.029-.11-.101-.143-.137-.146a6.6 6.6 0 0 0-1.142 0ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM9.5 8a1.5 1.5 0 1 0-3.001.001A1.5 1.5 0 0 0 9.5 8Z\"></path></svg> Settings]** をクリックします。 \\[設定] タブが表示されない場合は、 **\\[<svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-kebab-horizontal\" aria-label=\"More\" role=\"img\"><path d=\"M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z\"></path></svg>]** ドロップダウン メニューを選び、 **\\[設定]** をクリックします。\n\n   ![組織のプロファイルのタブのスクリーンショット。 \\[設定\\] タブが濃いオレンジ色の枠線で囲まれています。](/assets/images/help/discussions/org-settings-global-nav-update.png)\n\n4. 左側のサイドバーで、\\[ **<svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-copilot\" aria-label=\"copilot\" role=\"img\"><path d=\"M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z\"></path><path d=\"M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z\"></path></svg>Copilot** ] をクリックし、\\[ **コンテンツの除外**] をクリックします。\n\n5. \\[除外するリポジトリとパス] の下のボックスに、 Copilot を除外するファイルの詳細を入力します。\n\n   任意の場所 (Git リポジトリ内または他の場所) にあるファイルを除外するには、`\"*\":` を入力し、その後に除外するファイル (複数可) へのパスを入力します。 複数のファイル パス パターンを指定する場合は、各パターンを個別の行に一覧表示します。\n\nCopilotから Git リポジトリ内のファイルを除外するには、リポジトリへの参照を 1 行に入力し、その後にリポジトリ内の場所へのパスを入力し、各パスを個別の行に配置します。 次の形式を使用して、`REPOSITORY-REFERENCE` を、除外するファイルを含むリポジトリへの参照に置き換えます。\n\n```yaml\nREPOSITORY-REFERENCE:\n  - \"/PATH/TO/DIRECTORY/OR/FILE\"\n  - \"/PATH/TO/DIRECTORY/OR/FILE\"\n  - ...\n```\n\nリポジトリは、さまざまなプロトコルを使用して参照できます。\n`REPOSITORY-REFERENCE`には次のいずれかの構文を使用できます。Copilotは、リポジトリのローカルでの複製方法に関係なく、これらの構文と一致します。\n\n```text\nhttp[s]://host.xz[:port]/path/to/repo.git/\n\ngit://host.xz[:port]/path/to/repo.git/\n\n[user@]host.xz:path/to/repo.git/\n\nssh://[user@]host.xz[:port]/path/to/repo.git/\n```\n\nリポジトリに対して無視するパスの計算では、`user@` の `:port` 部分と `REPOSITORY-REFERENCE` 部分は無視されます。\n\nAzure DevOpsの場合は、`REPOSITORY-REFERENCE`を指定するときに新しい (dev.azure.com) または古い (visualstudio.com) ホスト形式を使用できます。Copilot は、リポジトリをローカルに複製するために使用されたホストに関係なく、それらに一致します。\n\n> \\[!TIP] fnmatch パターン マッチング表記を使用して、ファイル パスを指定できます。 パターンでは大文字と小文字が区別されません。 ruby-doc.org ドキュメントの「[ファイル](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch)」を参照してください。\n\n### Organization 設定のリポジトリとパスの例\n\n```yaml annotate\n# Ignore all `.env` files from all file system roots (Git and non-Git).\n# For example, this excludes `REPOSITORY-PATH/.env` and also `/.env`.\n# This could also have been written on a single line as:\n#\n# \"*\": [\"**/.env\"]\n\"*\":\n  - \"**/.env\"\n\n# In the `octo-repo` repository in this organization:\nocto-repo:\n  # Ignore the `/src/some-dir/kernel.rs` file.\n  - \"/src/some-dir/kernel.rs\"\n\n# In the `primer/react` repository on GitHub:\nhttps://github.com/primer/react.git:\n  # Ignore files called `secrets.json` anywhere in this repository.\n  - \"secrets.json\"\n  # Ignore files called `temp.rb` in or below the `/src` directory.\n  - \"/src/**/temp.rb\"\n\n# In the `copilot` repository of any GitHub organization:\ngit@github.com:*/copilot:\n  # Ignore any files in or below the `/__tests__` directory.\n  - \"/__tests__/**\"\n  # Ignore any files in the `/scripts` directory.\n  - \"/scripts/*\"\n\n# In the `gitlab-org/gitlab-runner` repository on GitLab:\ngit@gitlab.com:gitlab-org/gitlab-runner.git:\n  # Ignore the `/main_test.go` file.\n  - \"/main_test.go\"\n  # Ignore any files with names beginning with `server` or `session` anywhere in this repository.\n  - \"{server,session}*\"\n  # Ignore any files with names ending with `.md` or `.mk` anywhere in this repository.\n  - \"*.m[dk]\"\n  # Ignore files directly within directories such as `packages` or `packaged` anywhere in this repository.\n  - \"**/package?/*\"\n  # Ignore files in or below any `security` directories, anywhere in this repository.\n  - \"**/security/**\"\n```\n\n## Enterprise のコンテンツ除外の構成\n\nエンタープライズ所有者は、エンタープライズ設定を使用して、 GitHub Copilot が無視する必要があるファイルを指定できます。 ファイルは、Git リポジトリ内、または Git の管理下にないファイル システム上の任意の場所に配置できます。\n\n1. 企業ページに移動してください。 たとえば、GitHub.com の [\\[Enterprise\\]](https://github.com/settings/enterprises?ref_product=ghec\\&ref_type=engagement\\&ref_style=text) ページから。\n2. ページの上部にある **<svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-copilot\" aria-label=\"copilot\" role=\"img\"><path d=\"M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z\"></path><path d=\"M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z\"></path></svg> AI コントロール**をクリックします。\n3. サイドバーで<svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-copilot\" aria-label=\"copilot\" role=\"img\"><path d=\"M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z\"></path><path d=\"M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z\"></path></svg> **Copilot** をクリックします。\n4. <svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-circle-slash\" aria-label=\"circle-slash\" role=\"img\"><path d=\"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM3.965 13.096a6.5 6.5 0 0 0 9.131-9.131ZM1.5 8a6.474 6.474 0 0 0 1.404 4.035l9.131-9.131A6.499 6.499 0 0 0 1.5 8Z\"></path></svg>\n   **コンテンツを除外** をクリックします。\n5. パスを使用して、除外するコンテンツを指定します。 前のセクション「[Organization のコンテンツ除外の構成](#configuring-content-exclusion-for-your-organization)」をご覧ください。\n\n> \\[!NOTE]\n> エンタープライズ レベルでコンテンツの除外を設定することと組織レベルで設定する主な違いは、エンタープライズ レベルで設定されたルールは、企業内のすべての Copilot ユーザーに適用されるのに対し、組織の所有者によって設定されたルールは、その組織によって Copilot シートが割り当てられているユーザーにのみ適用される点です。\n\n## コンテンツ除外の変更をテストする\n\nIDE を使用して、コンテンツ除外の変更が想定どおりに動作していることを確認できます。\n\n### IDE にコンテンツ除外の変更を伝達する\n\nコンテンツの除外を追加または変更し、設定が既に読み込まれている IDE で有効になるまでに最大で 30 分かかることがあります。 待機しない場合は、次の手順を使用して、コンテンツの除外設定を手動で再読み込みできます。\n\n* **JetBrains IDE とVisual Studioの場合**は、アプリケーションを閉じて再度開いて、コンテンツ除外設定を再読み込みします。\n* **Visual Studio Codeの場合**は、次の手順に従ってコンテンツの除外設定を再読み込みします。\n  1. コマンドパレットにアクセスします。 たとえば、次のようになります。 <kbd>Shift</kbd>+<kbd>Command</kbd>+<kbd>P</kbd> (Mac) / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux)。\n  2. 次のコマンドを入力します: `reload`\n  3. **\\[開発者: ウィンドウの再読み込み]** を選択します。\n* **Vim/Neovim**、ファイルを開くたびに GitHub からコンテンツの除外が自動的にフェッチされます。\n\n### コンテンツの除外をテストする\n\n構成したコンテンツ除外が想定どおりに動作していることを確認できます。\n\n1. まず、コンテンツ除外の対象ではないファイルで、コンテンツ除外が機能していることを確認します。 これを行うには:\n   * IDE で、コンテンツ除外の対象ではないファイルを開きます。\n   * 通常、インライン提案が生成されるような編集を行ってください。 提案が提供されるはずです。\n2. 除外される必要があるファイルを開き、同じ編集を行います。 提案は提供されません。\n3. Copilot Chatのコンテンツ除外をテストするには:\n   * IDE で、 Copilot Chat パネルを開きます。\n   * 除外される必要があるファイルを開き、エディターで開いている他のファイルを閉じます。\n   * 開いているファイルがコンテキスト ファイルとしてプロンプトに添付されることを確認します。\n   * プロンプト `explain this file` を入力します。\n\n     ファイルが除外されている場合、 Copilot Chat はそのファイルを使用して応答を生成できなくなります。 ファイルは、 Copilotの応答の参照として一覧表示されません。\n\n## REST API を使用してコンテンツの除外を管理する\n\n組織の所有者とエンタープライズ所有者は、 GitHub REST API を使用してプログラムでコンテンツの除外を管理することもできます。\n\n詳しくは、「[Copilot コンテンツの除外管理のための REST API エンドポイント](/ja/rest/copilot/copilot-content-exclusion-management)」をご覧ください。\n\n## 参考資料\n\n* [GitHub Copilot のコンテンツの除外](/ja/copilot/concepts/context/content-exclusion)\n* [GitHub Copilot のコンテンツの除外に対する変更の確認](/ja/copilot/how-tos/configure-content-exclusion/review-changes)\n* [ Microsoft Learn ドキュメントの Visual Studio](https://learn.microsoft.com/en-us/visualstudio/ide/visual-studio-github-copilot-admin?view=vs-2022#configure-content-exclusion) のコンテンツ除外の構成\n* [GitHub Copilot ポリシーでサポートされるサーフェス](/ja/copilot/reference/supported-surfaces-for-policies)"}