Complete guide to GitHub Copilot
Getting started
Install the GitHub Copilot extension in VS Code or JetBrains and sign in with your GitHub account. The free plan already gives you limited access to autocomplete and basic chat. While you code, Copilot suggests code automatically and you accept it with Tab. For more complex requests, open Copilot Chat (Ctrl+Shift+I in VS Code, Cmd+Shift+I on Mac) and choose the right mode: "Ask" for simple questions, "Edit" for targeted changes, or "Agent" to have it work more autonomously across your entire project.
Use cases
Autocomplete while you code
Suggests code in real time based on the file's context, and Next Edit Suggestions predicts where you'll need the next change.
Agent mode for complex changes
With automatic access to your project's file structure and context, it resolves requests that touch multiple files without you having to point to them one by one.
Autonomous coding agent (Coding Agent)
Assign a GitHub issue to Copilot and it works asynchronously in the background; when you come back, you'll find a pull request already prepared.
Semantic code search
Finds code that's conceptually related (not just by keywords); for example, describing a login bug can take you straight to the authentication middleware.
Advanced setup
- Choose the chat mode"Ask" for simple Q&A-type questions, "Edit" for targeted, scoped changes, and "Agent" (available in VS Code and JetBrains) for broader tasks with automatic access to the whole workspace's context.
- Model selectionYou can choose between several underlying models (GPT-4o, Claude Sonnet, Claude Opus, Gemini) depending on the task, instead of relying on a single fixed model.
- Custom repository instructionsSave your project's style rules and conventions in a .github/copilot-instructions.md file; Agent mode follows them automatically.
- Billing by AI creditsAs of June 2026, usage is billed via GitHub AI Credits per token, replacing the old premium request units system.
Tips
- Use Agent mode for changes that touch multiple files, and Edit for targeted, scoped modifications: choosing the right mode from the start saves time.
- Define a copilot-instructions.md file with your project's conventions once: all of Agent mode's suggestions will follow them afterward.
- For well-defined, scoped tasks (a specific bug, a feature with a clear spec), delegate to the Coding Agent and review the pull request once it's ready.
- Switch models depending on the task: some perform better at code, others at explanations or more general reasoning tasks.
- Always review the workspace context Copilot is using in Agent mode, especially in large projects with multiple modules.
FAQ
Is GitHub Copilot free to use?
Yes, it has a free plan with limited features. Pro costs $10/month, Pro+ $39/month (with more credits and premium models), and there are Business and Enterprise plans for teams.
What's the difference between Agent Mode and the Coding Agent?
Agent Mode works with you in real time inside the editor; the Coding Agent is an autonomous background worker that you assign an issue to and come back to later for the result.
Does it work with JetBrains as well as VS Code?
Yes, as of March 2026 Agent mode is available in both VS Code and JetBrains.
How is usage billed in 2026?
As of June 2026, via GitHub AI Credits billed per token, instead of the previous premium request units system.
Based on docs.github.com and github.blog