GitHub Copilot is built into GitHub, so you can use it without installing anything.
This quickstart shows how to ask questions about code and assign a coding task to Copilot cloud agent. It takes about ten minutes.
Step 1: Ask Copilot about a file
-
Try these prompts to explore specific files in the
github/docsrepository.Copilot prompt In `github/docs`, look at `/package.json` and explain what this file does.
In `github/docs`, look at `/package.json` and explain what this file does.
In `github/docs`, look at `/package.json` and explain what this file does.Copilot prompt In `github/docs`, look at `/src/color-schemes/tests/color-mode-script.ts` and share how I could improve this code.
In `github/docs`, look at `/src/color-schemes/tests/color-mode-script.ts` and share how I could improve this code.
In `github/docs`, look at `/src/color-schemes/tests/color-mode-script.ts` and share how I could improve this code.
Next, open a file in a repository of your choice and ask Copilot questions about it.
-
Navigate to any repository you want to explore. It doesn't need to be your own.
-
Open any file in the repository.
-
Click the Copilot icon () at the top right of the file view.
-
In the prompt box, type a question and press Enter. For example:
Explain what this file does.How could I improve this code?What tests would cover this function?What was the last change and why was it made?
Copilot responds in the chat panel.
-
Ask follow-up questions to explore the code further. For example:
For more information, see Asking GitHub Copilot questions in GitHub.
Step 2: Assign an issue to Copilot
Note
To use Copilot cloud agent in this quickstart, upgrade to a paid plan such as Copilot Pro.
Without access to a paid plan, you can instead learn about the remaining steps by using Copilot in your preferred editor. See Quickstart for using GitHub Copilot in your IDE.
Copilot cloud agent can work on coding tasks autonomously. Assigning an issue is the easiest way to start, and Copilot creates a pull request when it finishes.
-
In a personal repository you have write access to, enable Copilot cloud agent from your Copilot settings.
- To enable Copilot cloud agent for repositories in an organization or enterprise instead, see Enable Copilot for further instructions.
-
Find an existing issue you'd like Copilot to work on, or create a new issue.
-
Open the issue. In the right sidebar of the issue, click Assignees.
-
Click Copilot from the assignees list.
-
Optionally, add context in the Optional prompt field—for example, coding patterns, files to modify, or testing requirements.
Copilot uses the issue title, description, and existing comments. Add follow-up information directly to the pull request after it opens.
Step 3: Review the resulting pull request
When Copilot finishes the task, it opens a pull request and requests your review.
- Open the pull request that Copilot created.
- Review the diff and verify the changes match what you intended.
- To request changes, mention
@copilotin a comment on the pull request, or push commits directly to the branch. - When you're satisfied with the changes, merge the pull request.
For more information, see Review output from Copilot.
Next steps
- Experiment with using Copilot cloud agent for research and multitasking. See Get started with Copilot agents on GitHub