GH-300 - Configure privacy, content exclusions, and safeguards (14% of the exam) - Section 6.1

Configure content exclusions and editor settings to control what Copilot can access.

Configure content exclusions at the repository and organisation level to stop GitHub Copilot using specified files as context or for suggestions, and adjust editor settings that govern Copilot behaviour. Understand the scope and propagation limits of content exclusions.

Content exclusionsEditor settingsRepository exclusionsExclusion scope

Practice question for this objective

Free sampleConfigure privacy, content exclusions, and safeguardsmedium

A platform team on Copilot Business keeps deployment secrets in a file named infra/secrets.env inside a repository, and wants to stop Copilot from using that file as context for code completions and IDE chat across the whole repository. Which control should the team configure to achieve this?

  • AAdd the file path to the repository's Copilot content exclusion settings, so Copilot stops using the matched file as context for completions and chat in that repository. Correct
  • BAdd the file path to the repository's .gitignore so Git stops tracking it, because untracked files are automatically withheld from every Copilot request as context.
  • CSwitch on duplication detection for the repository, because blocking suggestions that match public code also prevents named local files from being read as context.
  • DRegister the repository with a Model Context Protocol server, because an MCP connection lets Copilot decide which sensitive files to withhold from its context.
Recognise repository content exclusions as the control that stops named files being used as Copilot context for completions and chat. GitHub Copilot content exclusions are configured by path at the repository level on Copilot Business and Enterprise, and they prevent the matched files from being sent as context for code completions and IDE chat, which is distinct from Git tracking, duplication detection, or MCP.

Why A is correct: Repository content exclusions match files by path and stop Copilot using them as context for completions and IDE chat, which is exactly the repository-wide control the team needs.

Why B is wrong: .gitignore only controls what Git tracks and has no effect on what Copilot reads as context, so a tempting overlap with version control does not exclude the file.

Why C is wrong: Duplication detection screens suggestions against public source; it does not govern which local files are used as context, so it cannot exclude the secrets file.

Why D is wrong: Model Context Protocol connects Copilot to external tools and data and does not provide a file-exclusion list, so it is the wrong mechanism for withholding context.

See more GH-300 practice questions, answers explained.

Exam traps in Configure privacy, content exclusions, and safeguards

Answers that look right on this material and are not. Each one is a distractor from a different question in the GH-300 bank for this domain.

  • The rules also encrypt the excluded files at rest in the repository so that the secrets they contain cannot be read by collaborators.

    Why it is wrong: Tempting because the files hold secrets, but content exclusions only govern Copilot context and perform no encryption or access control on the repository.

  • Copilot deletes the excluded files from the repository so they can no longer be committed.

    Why it is wrong: Tempting given the sensitive content, but exclusions never remove files from the repository; they only restrict Copilot's use of them as context.

  • Exclusions revoke read access to the file for everyone except repository administrators, because the exclusion acts as an additional permission layer over the file.

    Why it is wrong: Exclusions are not a permission system and do not change who can read a file, so treating them as access control confuses a Copilot setting with repository permissions.

Examworthy is not affiliated with or endorsed by GitHub. Original, blueprint-aligned practice material only.