nerdexam
Microsoft

GH-300 · Question #77

What is the correct way to exclude specific files from being used by GitHub Copilot Business during code suggestions?

The correct answer is C. Use the GitHub Copilot settings in the user interface to exclude files. In GitHub Copilot Business (and Enterprise), content exclusions are configured through the GitHub organization or repository settings in the web UI - not through local files or naming conventions. Administrators navigate to Settings > Copilot > Content exclusion and specify…

Configure privacy, content exclusions, and safeguards

Question

What is the correct way to exclude specific files from being used by GitHub Copilot Business during code suggestions?

Options

  • AModify the .gitignore file to include the specific files.
  • BAdd the specific files to a copilot.ignore file.
  • CUse the GitHub Copilot settings in the user interface to exclude files.
  • DRename the files to include the suffix _no_copilot.

How the community answered

(34 responses)
  • A
    3% (1)
  • B
    6% (2)
  • C
    91% (31)

Explanation

In GitHub Copilot Business (and Enterprise), content exclusions are configured through the GitHub organization or repository settings in the web UI - not through local files or naming conventions. Administrators navigate to Settings > Copilot > Content exclusion and specify path patterns for files or directories to exclude. Option A is incorrect: .gitignore controls which files Git tracks, not which files Copilot can access. Option B is incorrect: there is no 'copilot.ignore' file - this does not exist in the Copilot feature set. Option D is incorrect: renaming files with a suffix has no effect on Copilot's behavior.

Topics

#File exclusion#GitHub Copilot settings#Privacy#Configuration

Community Discussion

No community discussion yet for this question.

Full GH-300 Practice