Skip to main content

AI tools · Coding

GitHub Copilot: setup, settings and troubleshooting

An AI pair programmer built into your IDE for code completion, chat, and automated tasks.

What is GitHub Copilot?

GitHub Copilot is an AI coding assistant that integrates directly into editors like VS Code, Visual Studio, JetBrains IDEs, and Neovim, as well as into GitHub.com itself. It suggests inline code completions as you type, powers a chat interface for asking questions about your code, and can take on larger autonomous tasks through Copilot Workspace and coding agent features. It's built and maintained by GitHub (Microsoft) in partnership with multiple AI model providers.

  • Inline code completions that suggest single lines or whole functions as you type
  • Copilot Chat in the IDE and on GitHub.com for asking questions, generating code, and getting explanations with codebase context
  • Slash commands like /fix, /tests, and /explain for common tasks directly in chat
  • Copilot coding agent, which can be assigned a GitHub issue and open a pull request with a working solution
  • Multi-model support (choice between different underlying models depending on plan) for chat and agent tasks
  • Copilot code review and PR summary generation to speed up the review process

Create an account

  1. Create or sign in to a GitHub account at github.com if you don't already have one.
  2. Go to github.com/copilot (or Settings > Copilot on GitHub) and start the free trial or subscribe to Copilot Individual, Business, or Enterprise.
  3. Verify billing/plan selection; organization admins enable Copilot Business/Enterprise for members from the org's settings instead of individual signup.

Install the app

  1. Open your IDE (VS Code, Visual Studio, JetBrains, or Neovim) and install the 'GitHub Copilot' and 'GitHub Copilot Chat' extensions from that IDE's marketplace.
  2. Restart the IDE if prompted so the extension activates fully.
  3. Confirm the Copilot icon appears in the status bar or sidebar, indicating the extension installed correctly.

Recommended first settings

  1. Choose a default chat model in the IDE's Copilot settings if multiple models are available on your plan.
  2. Enable/disable specific languages or file types for suggestions under Copilot settings if certain suggestions are unwanted (e.g., in config files).
  3. Turn on Copilot code review or PR summaries in repository settings if you want automatic review comments on pull requests.
  4. Review the organization's content exclusion settings (Business/Enterprise) to keep certain files or repos out of Copilot's context.

How to use GitHub Copilot

Start typing or write a comment describing what you want, and Copilot suggests completions inline that you accept with Tab or dismiss with Esc. For bigger tasks, open Copilot Chat, ask a question or use a slash command like /fix or /tests, and reference files with '#' to give it more context; assign well-scoped issues to the coding agent for it to open a draft pull request.

  • Write a clear comment or function signature before the code you want — Copilot's suggestions improve a lot with explicit intent.
  • Use Copilot Chat's '#file' and '#selection' references so answers are grounded in the actual code you're looking at, not guesses.
  • Treat every suggestion as a draft — review and test generated code, especially for logic-heavy or security-sensitive sections.

Common problems and fixes

Copilot shows 'Not signed in' or repeatedly asks to log in.
Sign out and back in via the Copilot status bar menu, making sure you authorize the IDE extension in the browser popup rather than closing it. If it persists, check that your GitHub account still has an active Copilot subscription/seat assigned.
Extension installed but no suggestions appear in the editor.
Confirm the Copilot extension is enabled for the specific file's language in IDE settings, and that the status bar icon shows it's active (not disabled or rate-limited). Restarting the IDE and checking for extension updates resolves most stuck states.
Suggestions or chat responses are slow or time out frequently.
This is often temporary service load; check GitHub's status page for reported incidents. Also verify your organization hasn't hit a usage cap (Business/Enterprise plans can have policy limits) that's throttling responses.
Copilot suggests code that doesn't match project conventions or is subtly wrong.
Give more context via comments, open related files in the same workspace so Copilot can reference them, and always test generated code before committing. For chat, reference specific files with '#' so answers use real project context instead of generic patterns.

Best practices

  • Write descriptive comments and function names before code so suggestions match your actual intent.
  • Review every suggestion before accepting, particularly around authentication, permissions, or financial calculations.
  • Use repository-level custom instructions (copilot-instructions.md) to keep suggestions consistent with your team's conventions.
  • Reserve the coding agent for small, clearly scoped issues rather than open-ended or architecturally complex ones.

Frequently asked questions

Is GitHub Copilot free?

There's a limited free tier for individual accounts with monthly completion and chat limits; full access requires Copilot Individual, Business, or Enterprise, which are paid plans (students and verified open-source maintainers may qualify for free access).

Which IDEs support GitHub Copilot?

Officially supported editors include VS Code, Visual Studio, JetBrains IDEs (IntelliJ, PyCharm, etc.), Neovim, and Xcode, plus Copilot Chat directly on GitHub.com and in the CLI.

Does Copilot use my private code to train its models?

By default, GitHub states that Copilot Individual doesn't use your code to train its underlying models for other users, and Business/Enterprise plans add additional data-handling controls — review GitHub's current Copilot Trust Center for specifics.

What is Copilot's coding agent?

It's a feature that can be assigned a GitHub issue directly, after which it works in the background to write code and open a pull request with a proposed solution for a human to review.

Other AI tool guides