exam questions

Exam GitHub Copilot All Questions

View all questions & answers for the GitHub Copilot exam

Exam GitHub Copilot topic 1 question 12 discussion

Actual exam question from GitHub's GitHub Copilot
Question #: 12
Topic #: 1
[All GitHub Copilot Questions]

How do you generate code suggestions with GitHub Copilot in the CLI?

  • A. Write code comments –> Press the suggestion shortcut –> Select the best suggestion from the list.
  • B. Use ‘gh copilot suggest’ –> Write the command you want –> Select the best suggestion from the list.
  • C. Type out the code snippet –> Use the copilot refine command to enhance it –> Review the suggest command.
  • D. Describe the project’s architecture –> Use the copilot generate command –> Accept the generated suggestion.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
mani021
3 months, 1 week ago
Selected Answer: B
B. Use ‘gh copilot suggest’ –→ Write the command you want –→ Select the best suggestion from the list. GitHub Copilot in the CLI (Command Line Interface) works through the GitHub CLI extension called gh copilot. Here's how it typically functions: You install the GitHub Copilot CLI extension. Use the command gh copilot suggest. Describe what you want the code to do. Copilot returns suggestions. You select the most appropriate one.
upvoted 1 times
...
a11smiles
3 months, 2 weeks ago
Selected Answer: A
The 'gh copilot suggest' is for making suggestions on commands. To create a code suggestion, write the comments.
upvoted 1 times
...
Shipra123
3 months, 4 weeks ago
Selected Answer: B
B. Use ‘gh copilot suggest’ –→ Write the command you want –→ Select the best suggestion from the list.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...