GitHub

How to Use GitHub Copilot Effectively

How to Use GitHub Copilot Effectively

Older Copilot tutorials have a problem. They talk about premium request limits, and those are gone. Since June 1, 2026, GitHub bills chat and agent usage in AI credits rather than premium requests (GitHub changelog, 2026).

Inline completions sit outside that system. They draw no credits and stay unlimited on paid plans (GitHub Docs, 2026).

As for the tool itself, Copilot completes code as you type and answers questions about it, and it can edit files across a whole repository from a plain-language prompt. You need an editor extension (Visual Studio Code is the usual pick) and a GitHub account that holds a plan.

Where can you use GitHub Copilot?

Mostly in your editor. Visual Studio Code, Visual Studio, JetBrains IDEs, Eclipse and Xcode are all supported, and there’s also the GitHub website, GitHub Mobile and a terminal tool called Copilot CLI.

Neovim and Vim are covered through the copilot.vim plugin. GitHub also ships a dedicated Copilot desktop app for managing agent work.

  • In an IDE you get inline suggestions, chat about the code nearby, and an agent that edits files.
  • The GitHub website handles questions about repositories, issues and pull requests, and it’s where you assign work to an agent.
  • GitHub Mobile is for quick questions when you’re away from your desk.
  • Copilot CLI suits repeatable command-line workflows.
  • The Copilot app runs parallel agent tasks across repositories and the pull request lifecycle.
  • GitHub Desktop gets help with commit messages and summaries.

If you are unsure where to start, GitHub’s docs point to the website. There is nothing to install, and you can ask about a repository, issue or pull request you already have open.

Feature parity differs by editor. Chat skills in IDEs exist only in Visual Studio Code and Visual Studio, and they are not part of Copilot Free (GitHub Docs plans page, 2026).

JetBrains users can take the Copilot plugin for the full experience, or go with JetBrains AI Assistant or Copilot CLI, which both work without the plugin.

Your own account’s available features are listed at github.com/settings/copilot/features. Editor-by-editor support is compared in GitHub’s Copilot feature matrix.

Which GitHub Copilot plan should you pick?

Start on Copilot Free, move to Pro when you hit its limits, and look at Pro+ or Max only if Pro’s credits run out before the month ends. Business and Enterprise are organization plans, billed per seat.

Why is GitHub the heart of open source?

Uncover GitHub statistics: developer community growth, repository trends, collaboration patterns, and the platform that powers modern software development.

Explore GitHub Data →
PlanPrice per monthMonthly AI creditsModel access
Free and Student$0An allowance, amount not listedAuto model selection only
Pro$101,500A selection of models
Pro+$397,000Premium models
Max$10020,000Priority access to premium models
Business and Enterprise$19 and $39 per seat1,900 and 3,900 per userPremium models, priority on Enterprise

Figures come from the GitHub Docs plans page as read in October 2026.

Free costs nothing, but it caps inline suggestions at 2,000 per month, leaves out cloud agent and agent mode, and offers auto model selection only.

Pro gives you unlimited completions and 1,500 credits for $10, though with a selection of models rather than the full list.

Pro+ is $39 for 7,000 credits and premium models. It pays off only if you run agent work often.

Verified students get Copilot Student at no cost, with unlimited completions and an allowance of AI credits. Verified teachers and maintainers of popular open source projects may be eligible for free Pro.

Looking to sharpen your Git skills? Branching, merging, rebasing, and everything else you need - including git rebase, git stash, and commit workflows - is on one page in the Git Cheat Sheet.

Sign-up status in October 2026

GitHub paused new sign-ups for Student, Pro and Pro+ on April 20, 2026. Its June 17, 2026 changelog says sign-ups for Student, Pro, Pro+ and Max reopened gradually over the following couple of weeks for new subscribers.

No later statement about individual plans appears in GitHub’s changelog. The most recent sign-up notice, dated September 3, 2026, covers Business and Enterprise only.

Some docs pages still carry the older notices, including the April pause and a note that Max is an upgrade for existing plan holders. If your preferred plan is not offered yet, check back, and check the billing page of your own account before you plan around Pro.

How to set up GitHub Copilot in your editor

YouTube player

Check your plan first, since it decides what you can do afterward.

  1. Confirm access. Copilot Free gives limited access and a paid plan gives full access. Your account status is at github.com/settings/copilot.
  2. Install. In Visual Studio Code, first-time setup installs the required extensions for you. Other editors use a plugin or extension, covered below.
  3. Sign in. Use the GitHub account that owns the plan and approve the permission request in the browser.
  4. Test. Type a function header such as function calculateDaysBetweenDates(begin, end) { and wait for gray text. Press Tab to accept it.

For a longer tour of the editor itself, see this piece on working with Copilot inside VS Code.

▶ GIT EXPLAINED

If you commit, branch, or merge code every day, it helps to know how Git came to be. This video covers how Linus Torvalds created Git in just 10 days after a license dispute and explains how its data model actually works.

Linus Torvalds Built Git in Days Out of Spite
Built in 10 Days Out of Spite. Git and its data model explained in plain language.

Setup differences in other editors

  • For JetBrains IDEs, install the GitHub Copilot plugin from Plugins, then Marketplace, restart, and pick Login to GitHub from the Tools menu. A device code authorizes the plugin in the browser.
  • Visual Studio 17.10 and later includes the unified Copilot and Chat extension as a built-in component. Versions 17.8 and 17.9 need the extension plus your GitHub account added to the Visual Studio keychain.
  • Neovim and Vim users clone github/copilot.vim into the plugin folder, then run :Copilot setup and :Copilot enable. Vim 9.0.0185 or Neovim 0.6 and Node.js 18 or above are required.
  • Xcode needs the GitHub Copilot for Xcode extension, the Accessibility and Xcode Source Editor Extension permissions, and a restart.
  • Eclipse wants version 2024-03 or above, installed from the Eclipse Marketplace. Restart, then sign in from the Copilot item in the lower right.

The Xcode Source Editor Extension permission has to be turned on by hand. Skip it and the extension installs but never suggests anything.

How to use inline suggestions

Type code or a comment, wait for gray text, press Tab to accept it or Esc to reject it.

A comment describing the goal works as a prompt. GitHub’s own example asks for code that finds images without alternate text and gives them a red border.

Action in VS CodeWindows and LinuxmacOS
Accept suggestionTabTab
Reject suggestionEscEsc
Next alternativeAlt+]Option+]
Previous alternativeAlt+[Option+[
Accept next wordCtrl+Right ArrowCommand+Right Arrow

Accepting a single line needs a custom shortcut for the command editor.action.inlineSuggest.acceptNextLine.

Next edit suggestions

Next edit suggestions predict where the next change belongs and what it should be. Press Tab to jump to the suggested location, then Tab again to accept.

A gutter arrow marks an available edit. It points up or down when the edit sits outside the visible area.

The docs state that completions and next edit suggestions are not billed in AI credits and stay unlimited on paid plans. Copilot Free caps completions at 2,000 per month.

When suggestions go missing

  • Duplication detection, the setting that blocks suggestions matching public code, can leave you with limited or no suggestions.
  • In Xcode, turn off the native predictive text completion, or two sets of suggestions compete. Tab accepts the first line there, and Option+Tab accepts the full suggestion.
  • Eclipse needs a manual trigger, which is Ctrl+Alt+/ on Windows or Option+Command+/ on macOS.

How to use Copilot Chat

Open the chat view, ask in plain language, and attach context with # references or / commands.

In the IDE, chat comes in two shapes. The chat view suits longer conversations, and inline chat works on the code in front of you.

In VS Code, click the chat icon in the title bar, or press Ctrl+Alt+I on Windows and Linux or Control+Command+I on macOS. If the icon is missing, right-click the title bar and select Command Center. This guide on opening Copilot Chat in VS Code walks through the same step.

Slash commands

  • /explain walks through how the code in the active editor works
  • /fix proposes a fix for problems in the selected code
  • /fixTestFailure finds and fixes a failing test
  • /tests generates unit tests for whatever you have selected
  • /new starts a new project

Available commands vary by editor. Visual Studio lists /doc and /optimize, and Xcode lists /simplify. Type / in the prompt box to see what your environment offers.

Treat the output of /tests as a first draft of your unit testing. A failing run is the quickest way to learn whether the tests check the right behavior.

Context references

Chat variables in VS Code attach specific context to a prompt:

  • #file for the current file
  • #selection for the selected text
  • #function for the current function or method
  • #project for the project context

On the GitHub website, @ mentions attach files, issues, pull requests, repositories and discussions instead.

Specific prompts get specific answers. Name the language, the framework and the output you expect.

Ask, agent, plan or cloud agent: which Copilot mode fits the task?

Chat handles explanations. Plan mode is for reviewing an approach before any edits happen, agent mode takes multi-step edits across files, and cloud agent picks up work that starts as a GitHub issue and comes back as a pull request.

Agent mode in the IDE

In agent mode, Copilot takes a high-level task, decides which files to change, makes the edits and runs commands, iterating until the task is done, per GitHub’s agent mode documentation.

The docs say it fits best when the task is complex (several steps, iterations, error handling) and Copilot should decide the steps, or when it needs an external tool such as an MCP server.

You confirm terminal commands before they run, unless an administrator or your editor settings allow automatic runs.

Every agent prompt consumes GitHub AI Credits, and a run that edits files and executes commands covers more work than one chat answer, so it costs more too.

If the mode selector shows no Agent entry, an enterprise or organization administrator may have disabled it. Agent mode needs Visual Studio 17.14 or later.

Plan mode

Plan mode drafts an implementation plan and makes no code changes until you review and approve it. It is available in VS Code, JetBrains IDEs, Xcode and Eclipse, but not in Visual Studio.

Reading a plan costs less than undoing a wrong refactor.

Cloud agent

Copilot cloud agent works from GitHub instead of your editor.

GitHub describes a typical hand-off. You start with an issue, assign it to the cloud agent, track the work in the Copilot app, review the pull request in your IDE, then merge on the web. Cloud agent and agent mode are not included on Copilot Free.

A decision rule for choosing a mode

For a question about existing code, ask in chat. If the scope is unclear or the change is big, plan first. A clear change spanning several files suits agent mode, and issue-driven work you’ll review later goes to the cloud agent.

Pick the lightest mode that finishes the job.

How to give Copilot context and custom instructions

Standing rules belong in instruction files inside the repository, so every prompt starts from the same baseline.

Repository-wide rules go in .github/copilot-instructions.md. Path-specific rules go in files ending in .instructions.md under .github/instructions/.

Personal and organization instructions exist too, and AGENTS.md carries rules shared across AI agents.

Where each instruction type works

Support differs by environment, so a rule that works in one editor can sit unused in another.

Copilot Chat inPersonalRepository-widePath-specific
GitHub websiteListedListedNot listed
Visual Studio CodeNot listedListedListed
Visual StudioNot listedListedListed
JetBrains IDEsListedListedListed
EclipseNot listedListedNot listed

The table comes from the custom instructions support reference in GitHub Docs, read in October 2026. “Not listed” means GitHub’s matrix does not list that type for the environment.

Visual Studio Code chat also reads AGENTS.md. Eclipse offers no custom instruction support for code review at all.

Which file holds which rule

  • copilot-instructions.md covers repository-wide rules specific to Copilot, such as coding standards and test expectations.
  • Path-specific files are for rules that only apply to certain directories or file types.
  • AGENTS.md is where you put rules you want every AI tool to follow.
  • Skills describe task workflows that Copilot runs when they’re relevant.

For pull requests, Copilot reads instructions and skills from the head branch. You can test a change to them inside the same pull request, before merging it.

Long instruction files cost something. GitHub notes that repository custom instructions raise the credits a code review consumes.

Prompt files, MCP servers and memory

  • Prompt files store a reusable prompt, and GitHub’s customization library includes samples for unit tests and a README.
  • Model Context Protocol (MCP) servers add tools for outside systems, and the GitHub MCP Server covers GitHub itself.
  • Copilot Memory, still in public preview, keeps useful details about a repository on paid plans.
  • Copilot Spaces bundle files and notes into task-specific context.

Repository MCP settings on GitHub apply to both cloud agent and code review, so a change there reaches both.

How to choose a model and track AI credits

Pick a model from the dropdown in the chat view, or leave it on Auto. Credits follow each model’s token pricing, so the choice changes your bill.

Picking a model in chat

  1. Open Copilot Chat and find the current-model dropdown. It sits at the bottom of the chat view in Visual Studio Code, and at the bottom right in Visual Studio, JetBrains IDEs, Eclipse and Xcode.
  2. Choose a model, or choose Auto and let Copilot decide based on availability.
  3. Start a new chat session if you were on Auto and want to switch.

Changing the chat model does not change the model behind inline suggestions, which has its own setting. Copilot Business members can switch only if the organization allows it.

As of October 2026 the docs list model families from OpenAI, Anthropic, Google, xAI and others, such as GPT-5.5, Claude Sonnet 5.5 and Gemini 3.8 Flash.

What consumes credits

Copilot Chat, Copilot CLI, cloud agent, Copilot Spaces, Spark and third-party coding agents all get billed. Usage is metered by input, output and cached tokens, priced per model.

A quick question to a lightweight model costs a fraction of a credit. A long cloud agent session on a frontier model across many files costs far more, per GitHub’s billing page for individuals.

Code review is the odd one out. It also draws GitHub Actions minutes on top of credits.

Key figures

  • One AI credit equals $0.01 USD.
  • The flex share of the allowance is 33% on Pro, 44% on Pro+ and 50% on Max (derived from GitHub’s base and flex split).
  • Auto model selection earns paid plans a 10% discount on model costs, in Copilot Chat, Copilot CLI, the Copilot app and cloud agent.
  • Credits reset at 00:00:00 UTC on the first day of each month, and unused ones are forfeited.

The flex allotment is the variable part. GitHub says it is designed to adapt as the economics of AI evolve, while base credits match the subscription price and never change.

That makes half of Max’s allowance adjustable. Older summaries also understate the allowance: GitHub’s announcement described Pro as $10 with $10 in credits, while the October docs add a flex allotment on top of base credits.

When credits run out

  • You can upgrade and pay only the price difference. Earlier usage counts toward the new allowance.
  • You can set a budget for additional usage, which may be capped until you pay what you already used.
  • Or just wait for the monthly reset.

Which everyday tasks does GitHub Copilot handle well?

Tests, explanations, debugging, refactoring and pull request work fit best, because each has a clear input and a result you can check.

Tests and debugging

Open an existing test file in an adjacent tab before asking for tests. Copilot sees your framework and writes tests that match it, according to GitHub’s testing tutorial.

Tests that check how components work together, such as integration tests, need smaller prompts. GitHub’s tutorial asks for one function at a time, with mocks standing in for outside services.

If the generated tests are invalid, give Copilot example inputs and outputs for the function.

For debugging, GitHub’s cookbook ships prompts for:

  • Diagnosing CI test failures
  • Debugging invalid JSON
  • Handling API rate limits

Refactoring and explanation

Explanation first, edits second.

Ask Copilot to explain a legacy function before you touch it, then request the change. That order is how cleaning up code through refactoring stays reviewable.

GitHub’s cookbook covers prompts for improving readability, optimizing performance, applying design patterns and translating code between languages. Run the tests before and after any change Copilot proposes.

Pull requests and code review

A Copilot code review typically consumes an estimated $0.05 to $1 in AI credits at Lite effort and $0.25 to $5 at Balanced effort, according to GitHub Docs. Those ranges exclude Actions minutes.

Lite is the faster pass. Balanced is the default: it routes the pull request to a higher-reasoning model, which suits security-sensitive code and changes that span services, and it may use slightly more Actions minutes. The default changed from Lite to Balanced on September 28, 2026, so choose Lite explicitly if you want it.

By default Copilot reviews a pull request only when you assign it. Automatic reviews are optional, and Copilot can also draft the pull request summary on GitHub.

Code review skips some files entirely:

  • Dependency manifests such as package.json and Gemfile.lock
  • Log files
  • SVG files

How to control privacy: public code matching and content exclusion

Most of the privacy controls live in two places. Individuals get the public code and training-data settings, and organizations add content exclusion.

Suggestions matching public code

  1. Click your profile picture on GitHub, then choose Copilot settings.
  2. Next to Suggestions matching public code, choose Block or Allow.

With Block, Copilot compares each suggestion and about 150 characters of surrounding code against public code on GitHub. A match or near match is not shown.

With Allow, you can open match details and click through to the source repositories.

Seat holders in an organization inherit this setting from the organization or enterprise. Experimental pre-release models may not respect it fully, per GitHub’s model documentation.

Content exclusion

The content exclusion documentation names organizations on Business and Enterprise as its audience. Repository administrators, organization owners and enterprise owners configure it.

GitHub’s plans overview also lists content exclusion as a feature row. Individuals on Free, Pro, Pro+ and Max should treat it as an organization feature.

Excluded files get no inline suggestions, and their content does not inform suggestions in other files or Copilot’s responses. Code review skips them as well.

A few limits are worth knowing:

  • Semantic information the IDE passes along indirectly, such as type information, hover definitions and build configuration, may still reach Copilot.
  • Symbolic links and repositories on remote file systems are not covered.
  • Edit and Agent modes of Copilot Chat in Visual Studio Code and other editors do not support it.
  • Changes take up to 30 minutes to reach an IDE that already loaded the settings.

In Visual Studio Code, a status bar icon with a diagonal line marks an excluded file.

Training data and model retention

Since April 24, 2026, GitHub may use interactions from Free, Pro, Pro+ and Max accounts, including inputs, outputs, code snippets and context, to train and improve models.

The opt-out is the “Allow GitHub to use my data for AI model training” setting in Copilot settings. Set it to Disabled.

Business and Enterprise data is not used for training, and the setting does not appear for those plans.

Model providers add their own terms. GitHub’s plans page notes that Anthropic retains prompts and outputs by default when Claude Fable 5 or Claude Fable 5.1 is used, with zero data retention available through the end of 2026 to eligible enterprises that request it.

Web search for Copilot Chat, powered by Bing, is off by default.

When does GitHub Copilot not work well?

Most problems are either bad output or something blocking Copilot from working at all. Both have known fixes.

When the output is wrong

Generated code can compile and still miss the point.

GitHub says generated tests may not cover all scenarios, and that code review is not guaranteed to spot every problem. Treat both as a first pass and add a human review.

When suggestions stop

  1. Check githubstatus.com for incidents affecting Copilot or model availability.
  2. Update the extension. Older clients cannot communicate with Copilot’s servers.
  3. Look at the status bar icon. A diagonal line means content exclusion applies to that file.
  4. In Visual Studio Code, sign out from the Accounts icon, run Developer: Reload Window from the F1 command palette, then sign back in.
  5. In Visual Studio, confirm the signed-in GitHub ID matches the one granted access, then remove and re-add it if needed.

The error “GitHub Copilot could not connect to server. Extension activation failed” means there is no Copilot plan, or the token request to api.github.com failed. Signing out and back in requests a new token.

The latest Copilot Chat works only on the latest Visual Studio Code release. An older chat version still gets current inline suggestions.

Usage-based billing also sets minimum client versions. Older ones keep working but can show wrong pricing and usage:

  • Visual Studio Code 1.120
  • Visual Studio 17.14.33 (2022) or 18.6.0 (2026)
  • JetBrains plugin 1.9.1
  • Eclipse plugin 0.18.0
  • Xcode extension 0.50.0
  • Copilot CLI 1.0.48

When plan or policy blocks you

Rate limits exist because computing capacity is limited, and popular features and models can receive bursts of requests. Auto model selection helps by choosing the best available model, which reduces rate limiting.

Wait and retry, check your usage, or upgrade if you are on an individual plan.

  • Copilot is not available for GitHub Enterprise Server.
  • Copilot Business members need the organization to allow model switching.
  • Code review on GitHub.com needs the organization’s Copilot code review policy turned on.

GitHub Copilot FAQ

Is GitHub Copilot the same as Microsoft 365 Copilot?

No. The two share a name and little else. Microsoft 365 Copilot is a separate product for Microsoft’s office apps, with its own plans, while GitHub’s version is a coding assistant that lives in editors, the GitHub website, the terminal and GitHub Mobile.

How does GitHub Copilot compare with ChatGPT, Cursor and Amazon Q Developer?

Copilot is an extension inside the editors you already use, plus the GitHub website. ChatGPT is a general chatbot, Cursor is a standalone AI code editor, and Amazon Q Developer is Amazon’s coding assistant.

Copilot’s picker offers models from OpenAI, Anthropic and Google, so workflow fit ends up being the main difference.

Which programming languages does GitHub Copilot support?

Inline suggestions are not limited to one language. GitHub’s inline suggestions guide demonstrates Java, C#, JavaScript, Swift and SQL, and says other languages work similarly.

Code review reads code in any language.

How do I install and start Copilot CLI?

Install it with npm, WinGet, Homebrew or an install script. The npm route needs Node.js 22 or later, and Windows needs PowerShell 6 or higher.

On first launch, run /login and follow the prompts. Seats provided by an organization also need the Copilot CLI policy turned on.

Can I turn GitHub Copilot off for one language?

Yes. In Visual Studio Code, set a language to false under github.copilot.enable in settings.json, for example “yaml”: false.

JetBrains IDEs list languages as checkboxes under Tools, GitHub Copilot, Completions. In Visual Studio, the status icon asks whether to disable globally or for the current language.

How do I cancel my Copilot plan?

Open Settings, then Billing and licensing, then Licensing. Choose Manage subscription in the GitHub Copilot section, and click Cancel subscription. Access lasts until the billing cycle ends, then the account moves to Copilot Free.

Verified students, teachers, open source maintainers and organization seat holders cannot cancel this way.

A First-Week Routine for GitHub Copilot

A sound first week runs from inline suggestions to chat to agent mode, in that order. Each step hands Copilot a larger piece of the repository, so errors stay small while you learn where it is reliable.

Days 1 and 2 go to inline suggestions, with a comment above each function. On days 3 and 4, move to chat questions, run /tests on one file, and write a first copilot-instructions.md. From day 5 onward, try one agent mode task on a separate branch.

The price of this order is slower early wins. Agent mode looks faster on day one, but its diff is hard to judge until you know what good suggestions look like in your own codebase.

This sequence was checked against GitHub’s documentation on October 4, 2026. Recheck it when GitHub changes the individual plan allowances or plan availability.

Bogdan Sandu

Stay sharp. Ship better code.

Every week: one curated article, one tool worth knowing, one tip you can use tomorrow. No noise, no padding.