GitHub Copilot Certification — Question 20
How can you use GitHub Copilot to get inline suggestions for refactoring your code? (Choose two.)
Answer options
- A. By adding comments to your code and triggering a suggestion.
- B. By highlighting the code you want to fix, right-clicking, and selecting “Fix using GitHub Copilot.”
- C. By running the gh copilot fix command.
- D. By using the “/fix” command in GitHub Copilot in-line chat.
- E. By highlighting the code, you want to fix, right-clicking, and selecting “Refactor using GitHub Copilot.”
Correct answer: A, D
Explanation
Option A is correct because adding comments is a recognized way to prompt GitHub Copilot for suggestions. Option D is also correct as it allows users to obtain suggestions through in-line chat. Options B, C, and E are incorrect since they do not reflect the correct methods for obtaining inline suggestions for refactoring with GitHub Copilot.