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