AI Tools & Chatbots

How to Use GitHub Copilot

Owned and published by DLTutu, an independent app-guide publisher. Editorial policy · Sources · Report a correction

Quick answer

The quickest path is to choose a GitHub Copilot plan, sign in with your GitHub account, and enable Copilot in your preferred editor, such as VS Code, Visual Studio, or a JetBrains IDE. Start with a small JavaScript file, accept an inline suggestion with Tab, then open Copilot Chat and ask about the code. Your first important setup task is to review Copilot’s public-code matching, model-training, and telemetry preferences before adding proprietary work.

Key takeaways

  • YesGitHub Copilot provides inline code suggestions, repository-aware chat, agent-assisted edits, code review, and pull-request automation.
  • YesCopilot Free includes limited inline suggestions, limited agent access, and Copilot Chat on GitHub.com and GitHub Mobile.
  • YesVS Code, Visual Studio, and JetBrains IDEs are supported; each has a different sign-in or installation path.
  • YesAgent mode can edit files and run tools, but you must review its proposed changes before accepting them.
  • YesRepository instructions help Copilot follow project-specific conventions instead of guessing.
  • YesYou can control public-code matching and model training, while VS Code also provides telemetry and feature-disabling settings.

GitHub Copilot is GitHub’s AI coding assistant for writing, understanding, reviewing, and maintaining software. It helps beginners learn a codebase, developers build routine features, and maintainers handle repetitive repository tasks. You can use it in VS Code, Visual Studio, and JetBrains IDEs, depending on the editor’s setup path. Inline suggestions reduce code-entry work, while Copilot Chat explains files and development concepts in context.

Agent mode can investigate a repository, plan work, and propose multi-file changes, while the cloud agent can turn an assigned issue into a pull request. This guide walks you through installation and authentication, the main editing and chat tools, effective repository instructions, and privacy controls for public-code matching, model training, and telemetry. It also shows how to request code review and why human review remains essential before changes are accepted or merged.

What is GitHub Copilot and how does it work?

Inline suggestions are proposed code completions that appear as you type; you accept or reject them individually. Copilot Chat is a conversational panel that can answer questions about files, repositories, and programming concepts. Agent mode receives a goal, examines the repository, plans changes, edits multiple files, and runs tools while the user approves actions. The cloud agent works in a restricted cloud environment and can open a pull request from an assigned issue. A custom instructions file gives Copilot repository-wide rules, while scoped instruction files apply guidance only to matching files. MCP servers are optional external tools that can give agent mode additional capabilities.

Before you start

  • YesA GitHub account and access to the repository you want Copilot to work on.
  • YesA supported editor or interface, such as VS Code, Visual Studio, a JetBrains IDE, Eclipse, Xcode, GitHub.com, or GitHub Mobile.
  • YesFor issue assignment or pull-request work, write access to a repository hosted on GitHub.
  • YesA clear understanding of the project’s language, dependencies, build commands, and review requirements.

How to use GitHub Copilot, step by step

Checked against the official pages: [1][2][3][4][5][6]

  1. Choose a Copilot plan

    Compare Copilot Free, Student, Pro, Pro+, Max, Business, and Enterprise based on your individual or organizational needs. Copilot Free provides limited inline suggestions, limited agent access, and Copilot Chat on GitHub.com and GitHub Mobile. Individual developers who do not receive Copilot through an organization or enterprise can use Copilot Free. Check the official GitHub listing for current plan details and eligibility.

  2. Turn on Copilot in VS Code

    Open VS Code and hover over the Copilot icon in the Status Bar. Select Use AI Features, choose a sign-in method, and follow the prompts. If your GitHub account does not include a Copilot subscription, VS Code can sign you up for Copilot Free. This setup also provides access to Copilot Chat and agent mode inside the editor.

  3. Install Copilot in a JetBrains IDE

    Open the Plugins settings, search the Marketplace for GitHub Copilot, and click Install. Restart the IDE when installation finishes. Open Tools > GitHub Copilot > Login to GitHub, click Copy and Open, and paste the device code in the browser. Click Continue and then Authorize GitHub Copilot Plugin to finish authentication.

  4. Set up Copilot in Visual Studio

    Recent Visual Studio releases include GitHub Copilot by default. If it is missing, install the GitHub Copilot extension from the official Visual Studio marketplace. Add your GitHub account to the Visual Studio keychain so Copilot can authenticate. Open a project before testing completions, chat, or agent mode.

  5. Try another supported environment

    GitHub.com provides access to Copilot Chat, issue assignment, pull requests, and Copilot code review without requiring a desktop editor. GitHub Mobile on iPhone and Android also provides Copilot Chat and plan access, making mobile useful for reviewing requests and staying informed. For intensive editing, testing, and multi-file work, use GitHub.com or a supported desktop IDE. Eclipse and Xcode also support Copilot through their respective integration paths.

  6. Accept an inline suggestion

    Create a new .js file in VS Code and type function calculateDaysBetweenDates(begin, end) {. Pause while Copilot displays the grayed-out suggestion, then press Tab to accept it. Copilot proposes completions one at a time, so inspect each suggestion before applying it. Continue the code as needed and reject suggestions that do not match your intent.

  7. Ask Copilot Chat about the code

    Open Copilot Chat with Ctrl+Alt+I on Windows or Linux, or Control+Command+I on macOS. Ask “what does this file do” to get a repository-aware explanation. Select a line and ask “explain this line” for a focused explanation. Use chat to clarify unfamiliar code, plan an approach, or identify errors, but verify the answer against the actual project.

  8. Delegate a task in agent mode

    Open the chat window, select Agent, describe the task, and press Enter. Copilot can research the repository, plan the work, edit files, and run tools. Review each proposed change and inspect any commands or tool actions before approving them. Accept the changes with your IDE’s controls only after checking that the implementation fits the project.

  9. Assign an issue to Copilot

    On GitHub.com, open the issue and click Assignees in the right-side menu. Select Copilot and, if useful, add requirements in the Optional prompt field. The cloud agent works on the issue, researches the repository, runs tests and linters, and opens a pull request. Review that pull request like any other contribution from another developer.

  10. Control workflow execution

    GitHub Actions workflows do not run automatically on changes made by Copilot until a person with write access approves them. Open the merge box on Copilot’s pull request and click Approve and run workflows. Inspect any files under .github/workflows/ first, especially when the issue did not explicitly request a deployment or release. The person who assigned the issue cannot approve Copilot’s own pull request.

  11. Request a Copilot code review

    Open a pull request and locate Reviewers in the right sidebar. Click Request next to Copilot to request an automated review. In VS Code, select code, right-click, and choose Review, or use Copilot Code Review - Uncommitted Changes in the Source Control view. Copilot can leave comments labeled High, Medium, or Low severity, but its comments do not count as a required human approval.

  12. Add repository instructions

    Create .github/copilot-instructions.md and write repository-wide guidance in Markdown. For narrower rules, add NAME.instructions.md files under .github/instructions/ and use an applyTo glob in the frontmatter. AGENTS.md files can also provide instructions for agents. Include build commands, coding conventions, forbidden actions, and testing requirements, while avoiding secrets.

  13. Set public-code and training preferences

    Click your profile picture, then Copilot settings. Next to Suggestions matching public code, choose Allow or Block; an organization may restrict this choice through its administrator. Set Allow GitHub to use my data for AI model training to Disabled to opt out on Free, Pro, Pro+, and Max plans. These settings affect how Copilot may use code during its operation and model improvement.

  14. Use an optional power feature

    In VS Code, run MCP: Add Server, or open Chat: Open Customizations > MCP Servers > Add Server. An MCP server can give agent mode access to an external tool or information source. Before installing, review the server’s publisher and command because the server may receive repository data or influence agent actions. Add only servers from sources you trust.

Key GitHub Copilot features explained

1

Inline code suggestions

Copilot proposes code as you type and lets you apply suggestions one at a time. Use it for boilerplate, common API calls, and predictable completions, while reviewing every suggestion for correctness and security.

2

Copilot Chat

Copilot Chat answers questions about selected code, files, repositories, and development concepts. Use it to explain unfamiliar logic, compare approaches, or plan a change before editing anything.

3

Agent mode

Agent mode researches the repository, creates a plan, edits multiple files, and runs tools while you approve actions. It suits bounded maintenance tasks with clear acceptance criteria, such as updating tests or fixing a documented defect.

4

Cloud agent and issue assignment

Assigning an issue to Copilot starts work in a restricted cloud environment, where the cloud agent runs tests and linters and opens a pull request. It works only with repositories hosted on GitHub and requires a user with write access.

5

Copilot code review

Copilot reviews pull requests or uncommitted changes and can add comments labeled High, Medium, or Low severity. Use it as an additional review layer, not as a substitute for the repository’s required human reviewers.

6

Custom instructions and reusable guidance

Repository instructions, scoped instruction files, reusable prompts, custom agents, and agent skills can standardize how Copilot works. Use them to encode project conventions, validation commands, and actions the assistant must never take.

Tips & shortcuts

  • Use a small test repository first so you can distinguish a useful completion from an incorrect suggestion.
  • Press Tab only when the inline suggestion matches your intended API, data types, and error handling.
  • Ask Copilot to explain its proposed plan before allowing agent mode to modify several files.
  • Keep .github/copilot-instructions.md short, specific, and limited to conventions the repository actually enforces.
  • Mention exact test commands in the issue’s Optional prompt when assigning work to the cloud agent.
  • Review Copilot’s pull request and any new dependency changes before approving workflow runs.
  • Remember that Copilot does not see comments added to an issue after assignment; add missing information to its pull request instead.

Common mistakes to avoid

  • Accepting every inline suggestion without reading it can introduce incorrect behavior, so review each completion before pressing Tab.
  • Assigning a vague issue can produce an unfocused pull request, so include acceptance criteria and constraints in the Optional prompt field.
  • Approving workflow runs before inspecting .github/workflows/ can expose credentials or trigger unintended deployments.
  • Treating a Copilot review comment as approval can bypass required controls because Copilot’s comments do not count toward required approvals.
  • Adding an MCP server without checking its publisher and command can give an external tool access to sensitive repository data.

Troubleshooting

Copilot does not appear in the editor

In VS Code, hover over the Copilot icon in the Status Bar and select Use AI Features. In a JetBrains IDE, confirm that GitHub Copilot is installed in Plugins and restart the IDE, then sign in through Tools > GitHub Copilot > Login to GitHub.

The inline completion is missing or rejected

Move the cursor to the location where a completion should appear and allow Copilot a moment to respond. Confirm that AI Features are enabled and that the current plan provides the suggestion you are trying to use. Copilot Free has limited inline suggestions.

Copilot Chat does not answer with repository context

Open the relevant file or repository before asking, and include the file name when context matters. For a focused question, select the code first and ask “explain this line.” Check that you are signed into the intended GitHub account.

The cloud agent does not open a pull request

Confirm that the issue is in a repository hosted on GitHub and that your account has write access. Verify that Copilot was selected under Assignees and that the Optional prompt contains any missing requirements. Later issue comments are not visible to the cloud agent, so provide updates on its pull request.

GitHub Actions do not run on the Copilot pull request

Open the pull request’s merge box and have a person with write access click Approve and run workflows. The person who assigned the issue cannot approve the pull request. Review changes under .github/workflows/ before approving execution.

Privacy & safety

Review the public-code filter and model-training controls in Copilot settings before using Copilot with sensitive work, and check whether your organization manages either setting. In VS Code’s free Copilot configuration, telemetry is enabled; set telemetry.telemetryLevel to off if you want to opt out, and review the GitHub Copilot Trust Center before sending proprietary code. Set chat.disableAIFeatures if you want to hide Copilot chat and inline suggestions entirely. Only install the official Copilot integration from GitHub or the editor’s official marketplace, and never enter GitHub credentials in a prompt, issue, or unsolicited message. The cloud agent’s output can be incorrect or insecure, so inspect code, dependencies, tests, workflow files, and tool commands before merging.

Sources

These are the developers' and platforms' own pages we checked this guide against. What an app does is taken from them; which app suits whom is our editorial judgement. Links open the official site.

  1. Plans for GitHub Copilot - GitHub Docs docs.github.com
  2. Set up GitHub Copilot in VS Code code.visualstudio.com
  3. Installing the GitHub Copilot extension in your environment - GitHub Docs docs.github.com
  4. Quickstart for using GitHub Copilot in your IDE - GitHub Docs docs.github.com
  5. Using Copilot in the cloud on GitHub - GitHub Docs docs.github.com
  6. Using GitHub Copilot code review - GitHub Docs docs.github.com
  7. Adding repository custom instructions for GitHub Copilot - GitHub Docs docs.github.com
  8. Managing GitHub Copilot policies as an individual subscriber - GitHub Docs docs.github.com
  9. Add and use MCP servers in VS Code code.visualstudio.com
  10. About GitHub Copilot - GitHub Docs docs.github.com
  11. GitHub Copilot on GitHub.com and GitHub Mobile - GitHub Docs docs.github.com
  12. Risks and mitigations for GitHub Copilot cloud agent - GitHub Docs docs.github.com

Frequently asked questions

Is GitHub Copilot free?

GitHub Copilot Free is available to individual developers who do not receive Copilot through an organization or enterprise. It includes limited inline suggestions, limited agent access, and Copilot Chat on GitHub.com and GitHub Mobile. Student, Pro, Pro+, Max, Business, and Enterprise options are also available, depending on eligibility. Check the official GitHub Copilot listing for current plan features and pricing.

Is GitHub Copilot safe to use?

GitHub Copilot can be used safely when you review its suggestions and control its data settings. Check whether Copilot may match suggestions against public code, opt out of model training on eligible individual plans, and review the GitHub Copilot Trust Center. Treat generated code like code from any contributor: inspect it, test it, and check dependencies before merging.

Can I use GitHub Copilot on a computer?

Yes. GitHub Copilot works in supported desktop development environments, including VS Code, Visual Studio, JetBrains IDEs, Eclipse, and Xcode on the platforms those editors support. You sign in with your GitHub account, then use inline suggestions, chat, agent mode, and code review inside the editor. VS Code includes Copilot through the Use AI Features flow in the Status Bar.

What is the difference between GitHub Copilot on iPhone and Android?

The main difference is the interface, not the core assistant. Both iPhone and Android users can access Copilot through GitHub Mobile, including Copilot Chat and account management. For repository editing, local testing, and detailed diff review, GitHub.com or a supported desktop IDE provides a more suitable workflow. The mobile app and GitHub.com also cover repository actions that do not require a local development environment.

How do I turn on GitHub Copilot in VS Code?

Hover over the Copilot icon in the VS Code Status Bar and select Use AI Features. Choose a sign-in method and follow the prompts using your GitHub account. If your account has no Copilot subscription, VS Code can sign you up for Copilot Free. After setup, test the feature in a small file and use Tab to accept an inline suggestion.

Can GitHub Copilot edit multiple files?

Yes. Agent mode can research a repository, plan a change, edit multiple files, and run tools while you approve its actions. Open the chat window, select Agent, describe the task, and press Enter. Review the proposed diff and tool activity before accepting the changes. Copilot does not merge code automatically.

How do I assign a GitHub issue to Copilot?

On GitHub.com, open the issue and click Assignees in the right-side menu. Select Copilot, then add requirements in the Optional prompt field if the issue does not contain enough detail. The cloud agent researches the repository, works on the task, runs tests and linters, and opens a pull request for review.

Does Copilot replace a human code review?

No. Copilot code review adds comments labeled High, Medium, or Low severity, but its comments are comments by default and do not count toward required approvals. It also does not see or reply to replies to its review comments. Keep the repository’s normal human review and branch-protection requirements in place.

Can I use GitHub Copilot without a paid subscription?

Yes. Copilot Free provides limited inline suggestions, limited agent access, and Copilot Chat on GitHub.com and GitHub Mobile at no cost. You still need a GitHub account, and some organization or enterprise accounts may receive Copilot through their administrator instead. Use the official GitHub Copilot settings to confirm your current access and preferences.

How do I use GitHub Copilot in Visual Studio?

Open Visual Studio and, if GitHub Copilot is missing, install the GitHub Copilot extension from the official Visual Studio marketplace. Add your GitHub account to the Visual Studio keychain so Copilot can authenticate. Open a project before testing inline completions, Copilot Chat, or agent mode. Recent Visual Studio releases include GitHub Copilot by default.

How do I use GitHub Copilot in IntelliJ?

Open the Plugins settings in your JetBrains IDE, search the Marketplace for GitHub Copilot, and click Install. Restart the IDE when installation finishes. Then open Tools > GitHub Copilot > Login to GitHub, click Copy and Open, and paste the device code in the browser. Click Continue and Authorize GitHub Copilot Plugin to finish authentication.

How do I use GitHub Copilot effectively?

Use Copilot’s editing and chat tools together. Inspect each inline suggestion before accepting it, use Copilot Chat to clarify unfamiliar code or plan an approach, and add repository instructions so agent mode follows project conventions. For multi-file work, review proposed changes, commands, dependencies, tests, and workflow files before approving or merging them.

Spotted something out of date? Report a change

Tell us what changed. We check every report against official sources before we update a guide — nothing is published automatically.

We store what you send to review it. See our privacy policy.