Skip to main content

Démarrage rapide pour GitHub Copilot

Apprenez rapidement à utiliser GitHub Copilot.

Introduction

You can use Copilot to get answers to coding-related questions, such as how best to code something, how to fix a bug, or how someone else's code works. For full details of what Copilot can do, see What is GitHub Copilot?.

If you have access to Copilot Workspace, Copilot can also help you when you are editing files in a pull request on the GitHub website by offering you code completion suggestions. For more information about Copilot Workspace, see Using Copilot to help you work on a pull request.

Instructions for using Copilot differ depending on where you are using it. This version of the quickstart is for GitHub. Click the tabs above for instructions on using Copilot in other environments.

Sign up for GitHub Copilot

Get started for free

If you don't already have access to GitHub Copilot, you can set up a free trial or subscription for Copilot Pro on your personal GitHub account.

Alternatively, you can set up Copilot Free which enables you to enjoy limited access to some of the features of Copilot, without needing to sign up for a subscription. See About GitHub Copilot Free.

For more information about the different plans for GitHub Copilot, see Subscription plans for GitHub Copilot.

Asking your first question

  1. On GitHub, navigate to a repository and open a file.

  2. Click the Copilot icon () at the top right of the file view.

    Screenshot of the Copilot button, highlighted with a dark orange outline, at the top of the file view.

  3. Type a question in the "Ask Copilot" box at the bottom of the chat panel and press Enter.

    For example, you could enter:

    • Explain this file.
    • How could I improve this code?
    • How can I test this code?

    Copilot responds to your request in the panel.

  4. You can continue the conversation by asking a follow-up question. For example, you could type "tell me more" to get Copilot to expand on its last comment.

Other questions you can ask

There are many more things you can do with GitHub Copilot Chat in GitHub. For example:

  • Ask a general question about software development
  • Ask exploratory questions about a repository
  • Ask a question about a knowledge base
  • Find out about the changes in a pull request
  • Ask a question about a specific issue or commit

For more information, see Asking GitHub Copilot questions in GitHub.

Next steps