Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
- This is a preview feature provided under Microsoft Product Terms.
- Preview features may have restricted functionality and may not be released for general availability. These features are available before an official release so that customers can get early access and provide feedback.
- You need to be part of the Frontier preview program to get early access. Frontier connects you directly with Microsoft's latest AI innovations. Frontier previews are subject to the existing preview terms of your customer agreements. As these features are still in development, their availability and capabilities may change over time.
You can connect your GitHub account to Copilot Code to work with existing repositories, ask questions about your code, make changes through pull requests, and keep track of your issues and reviews. Connecting GitHub is optional—you don't need it to build, preview, and save projects in Copilot Code.
Connect your GitHub account
To connect your GitHub account, follow these steps:
- In the Code tab, start the GitHub connection from the side navigation or when you choose to work with a repository.
- Sign in to GitHub and authorize the connection.
Your GitHub account connects to Microsoft Copilot as a linked service, following the same model used for other connected services. Your organization's admin might restrict which GitHub accounts you can connect. For details, see Manage Copilot Code for your organization.
Note
Your system administrator must enable working with GitHub in Copilot Code. This feature might not be available.
Warm-start from a repository
After you connect your account, you can start from an existing repository instead of a blank project.
- Local project: Connect a remote GitHub repository and create a local clone to work with on your device.
- Existing local clone (local projects): Add the folder path to a repository you already cloned. If Copilot Code doesn't find a GitHub remote, it treats the folder as a local project.
Ask about a repository
When you connect a repository, you can ask Copilot Code questions about the code in plain language, such as:
- What do I need to change to add a new field end-to-end?
- Where is the signup flow handled in this repo?
Code reads the repository to answer your questions and can trace through the files involved.
Make changes with pull requests
You can ask Copilot Code to make changes to a connected repository. Copilot Code can:
- Create branches and commits.
- Open a draft pull request with a description of the change.
- Push changes to GitHub.
The app shows the status of a pull request, so you can see whether it's a draft, in review, merged, or canceled.
Tip
In Plan mode, review the plan Copilot Code proposes before it makes changes. You can push back on a decision, and Copilot Code updates its approach before it continues.
Create a repository for a project
If you started a project in Copilot Code without GitHub, you can create a GitHub repository for it later (local only). This repository gives you a place to collaborate and a path to continue the project in other GitHub tools.
Track your work in My Work
After you connect a GitHub account, My Work appears in the side navigation. It shows:
- Your issues.
- Your active pull requests.
- Pull requests waiting on your review.
Select an item to open it and continue your work.