GitHub Copilot Certification — Question 5
What is the correct way to exclude specific files from being used by GitHub Copilot Business during code suggestions?
Answer options
- A. Modify the .gitignore file to include the specific files
- B. Add the specific files to a copilot.ignore file
- C. Use the GitHub Copilot settings in the user interface to exclude files
- D. Rename the files to include the suffix _no_copilot
Correct answer: C
Explanation
The correct method to exclude files from GitHub Copilot Business is by using the GitHub Copilot settings in the user interface. Modifying the .gitignore file or adding files to a copilot.ignore file does not directly affect Copilot's behavior, and renaming files with a suffix does not provide a mechanism for exclusion.