GitHub Copilot has five plans. Copilot Free, Pro and Pro+ are for individuals, with Free capped by monthly limits. Copilot Business is bought by an organization per seat and adds central seat management, policies, content exclusions and the audit log, and Copilot Enterprise adds more on top for companies on GitHub Enterprise Cloud. Premium models use a monthly premium request allowance, and extra usage is either paid for or blocked by a budget.
- Individual plans: Copilot Free (monthly limits), Pro and Pro+.
- Organization plans: Copilot Business (per seat) and Copilot Enterprise (GitHub Enterprise Cloud).
- Business and Enterprise add seat management, policies, content exclusions and audit log events.
🎯 Exam tip: "Organization needs to manage who gets Copilot and set policies" = Copilot Business (or Enterprise).
⚠️ Watch out: Thinking content exclusions are available on Free or Pro. They're Business and Enterprise features.
To enable Copilot in VS Code, install the GitHub Copilot Chat extension, sign in with GitHub using an account that has Copilot access (Copilot Free, a paid plan or a seat from your organization), and check the Copilot icon in the status bar. The github.copilot.enable setting turns completions on or off per language. Visual Studio, JetBrains IDEs, Xcode, Eclipse and Vim/Neovim have their own Copilot extension with the same GitHub sign-in.
- VS Code: install the GitHub Copilot Chat extension, which brings chat, inline suggestions and agents.
- Sign in with a GitHub account that has Copilot Free, a paid plan or an organization seat.
- The status bar icon shows Copilot's state and opens quick settings.
🎯 Exam tip: "Turn off Copilot for Markdown files only" = github.copilot.enable with that language set to false.
⚠️ Watch out: Signing in with a personal account when the seat belongs to the work account.
You trigger GitHub Copilot in four main ways. Inline suggestions appear as grey ghost text while you type (Tab accepts, Esc dismisses, Alt+] shows the next one). Inline chat (Ctrl+I) changes the code in front of you. The Chat view (Ctrl+Alt+I) has three modes: Ask answers without editing, Edit changes the files you pick for you to Keep or Undo, and Agent plans, edits, runs commands after your approval and iterates until the task is done. In the terminal, Copilot CLI does the same agent work.
- Inline suggestions: Tab accept, Esc dismiss, Alt+] / Alt+[ next and previous (Option on macOS), Ctrl+Right Arrow next word, Ctrl+Enter completions panel.
- Next edit suggestions (NES) predict your next edit, not only the next characters.
- Inline chat is Ctrl+I and changes code in place; the Chat view is Ctrl+Alt+I.
🎯 Exam tip: "Answer only, no file changes" = Ask mode.
⚠️ Watch out: Using Agent mode just to ask a question, when Ask would answer without touching files.
In Copilot Chat, slash commands run common jobs (/explain, /fix, /tests, /doc, /new, /clear, /help), participants starting with @ bring in a domain expert (@workspace, @vscode, @terminal, @github), and # adds context (#file, #selection, #codebase, #terminalLastCommand, #changes). The model picker (including Auto) chooses the model your plan and organization allow, 👍 / 👎 sends feedback, and prompt files (.github/prompts/*.prompt.md, run as /name) reuse a good prompt. Chat only sees the context you give it in a finite context window, and its answers can be wrong.
- Slash commands: /explain, /fix, /tests, /doc, /new, /clear, /help.
- Participants (@): @workspace, @vscode, @terminal, @github.
- Context (#): #file, #selection, #codebase, #terminalSelection, #terminalLastCommand, #changes. You can also drag in files and images.
🎯 Exam tip: "Generate unit tests for the selected function" = /tests.
⚠️ Watch out: Keeping one endless chat for unrelated topics.
GitHub Copilot CLI is an AI agent in your terminal, run with the copilot command. It reads the repo you're in, answers questions, edits files and runs commands after asking you. Install it with npm install -g @github/copilot (Node.js 22+), brew install --cask copilot-cli, winget install GitHub.Copilot or the install script. On first run it asks you to trust the folder, then you sign in with /login (or a fine-grained token in COPILOT_GITHUB_TOKEN, GH_TOKEN or GITHUB_TOKEN). Inside a session, slash commands like /model, /mcp, /usage and /help control it, @path adds a file and !cmd runs a shell command.
- Copilot CLI is the copilot command: an agent in the terminal that asks before it edits or runs anything new.
- Install: npm install -g @github/copilot (Node.js 22+), brew install --cask copilot-cli, winget install GitHub.Copilot, or curl -fsSL https://gh.io/copilot-install | bash.
- copilot update and copilot version keep it current.
🎯 Exam tip: "Install Copilot CLI with npm" = npm install -g @github/copilot.
⚠️ Watch out: Installing on Node.js 20 and wondering why npm fails. It needs 22 or later.
GitHub Copilot CLI runs two ways. An interactive session (copilot, or copilot -i "…" to start with a prompt) asks before each new tool, and a yes can last for the session; /exit saves it and copilot --continue or --resume brings it back. A non-interactive run (copilot -p "…") does one prompt and exits, so it can't ask: it only uses tools you pre-approve with --allow-tool (such as 'write' or 'shell(git)'), and --deny-tool always wins. Use it to generate scripts and tidy files, then read the result before you run it.
- copilot starts an interactive session; copilot -i "prompt" starts one with a first prompt.
- copilot -p "prompt" runs once and exits; it can only use pre-approved tools.
- --allow-tool and --deny-tool take patterns: 'write', 'shell', 'shell(git)', '<mcp-server>(tool)'. Deny wins.
🎯 Exam tip: "Run Copilot CLI in a script with no prompts" = copilot -p plus --allow-tool.
⚠️ Watch out: Expecting copilot -p to pause and ask for permission.
Agent mode lets Copilot take a whole task: it plans, finds and edits files, runs terminal commands after you approve them, reads the output and iterates until the task is done. Copilot Edits (Edit mode) only changes the files you choose. MCP (Model Context Protocol) servers give the agent extra tools, such as the GitHub MCP server at https://api.githubcopilot.com/mcp/, configured in .vscode/mcp.json and allowed or blocked by an organization's MCP policy. Agent sessions keep separate pieces of work apart, and a sub-agent does a side task in its own context and returns only a summary, so the main conversation's context window stays focused.
- Agent mode plans, edits files, runs terminal commands after approval and iterates until done.
- Copilot Edits (Edit mode) changes only the files you add and shows diffs to Keep or Undo.
- MCP servers add tools. VS Code reads .vscode/mcp.json with a "servers" object; the CLI uses /mcp and ~/.copilot/mcp-config.json.
🎯 Exam tip: "Connect Copilot to an external tool or data source" = MCP server.
⚠️ Watch out: Thinking Edit mode runs tests. Only Agent mode runs commands.
Custom instructions are standing rules that Copilot adds to requests for you. Repository-wide rules go in .github/copilot-instructions.md, which Copilot Chat, the coding agent and code review all read; path-specific rules go in .github/instructions/*.instructions.md with an applyTo glob; agents also read AGENTS.md. A prompt file (.github/prompts/*.prompt.md) is a reusable prompt you run with /name in chat, with front matter for mode, description, tools and model and ${input:name} variables, so everyone on the team sends the same request.
- .github/copilot-instructions.md holds repository-wide rules. Copilot Chat, the coding agent and code review read it.
- Path-specific rules go in .github/instructions/*.instructions.md with an applyTo glob in front matter.
- Agents also read AGENTS.md. Personal and organization instructions can exist too.
🎯 Exam tip: "Rules for the whole repository, used by chat, coding agent and code review" = .github/copilot-instructions.md.
⚠️ Watch out: Putting every rule in copilot-instructions.md so test-only rules apply to all code.
Copilot code review reads a pull request and leaves review comments, often with a suggested change you can commit in one click. You add Copilot under Reviewers (or ask for a review in your IDE), or a ruleset requests it automatically on new pull requests. Its review is always a Comment: it never approves or requests changes and doesn't count toward required approvals, so a person still approves and merges. It follows your team's standards from .github/copilot-instructions.md and path-specific .instructions.md files, and it's part of the paid Copilot plans.
- Request Copilot under Reviewers on a pull request, or ask for a review from the IDE.
- A ruleset can request a Copilot review on every new pull request automatically.
- Copilot leaves Comment reviews with suggested changes you can commit.
🎯 Exam tip: "Review every new PR automatically" = a ruleset that requests a Copilot review.
⚠️ Watch out: Expecting Copilot's review to satisfy a "1 required approval" branch rule.
Three Copilot features on github.com solve three different problems. A pull request summary comes from the Copilot button in the PR description box: it describes what changed and which files, and you edit in the *why*. Copilot Spaces collect curated context (files, issues, notes and instructions) for a topic, so every question asked in that space is grounded in the same sources and the team can share it. GitHub Spark turns a plain-language description into a working micro app you can refine and publish; it's available on Copilot Pro+ and Copilot Enterprise.
- The Copilot button in the pull request description box writes a summary of the changes.
- Edit the summary. Add the why, the risk and how to test, which a diff can't tell Copilot.
- Copilot Spaces gather files, issues, notes and instructions so answers are grounded in the same sources.
🎯 Exam tip: "Describe the changes in a pull request quickly" = Copilot PR summary in the description box.
⚠️ Watch out: Opening a pull request with an unedited Copilot summary that says what changed but not why.
Copilot policies decide what members with a Copilot seat can use. In Organization settings › Copilot, Access sets who gets a seat (all members, selected members and teams, or nobody), Policies switch features on or off (Copilot Chat in the IDE and on github.com, Copilot CLI, Copilot code review, Copilot coding agent, MCP servers in Copilot and suggestions matching public code), and Models chooses which models appear in the picker. An enterprise can enforce a policy for all its organizations, which they can't override, or leave it at No policy so each organization decides.
- Organization settings › Copilot › Access: seats for all members, selected members and teams, or nobody.
- Policies switch features: Copilot in the IDE, Copilot Chat on github.com, Copilot CLI, code review, coding agent, MCP servers, suggestions matching public code.
- Models controls which models members can pick. A disabled model disappears from the picker.
🎯 Exam tip: "Organizations can't change this setting" = the enterprise enforces the policy.
⚠️ Watch out: Trying to change an enforced enterprise policy at the organization level.
Every Copilot admin change leaves a trail in the organization's audit log: events start with copilot. (seats added or cancelled, policy changes, content exclusion changes) and you find them by searching action:copilot. To manage the subscription in code, use the Copilot user management REST API: GET /orgs/{org}/copilot/billing for the settings, GET /orgs/{org}/copilot/billing/seats for every seat with last_activity_at and last_activity_editor, and POST or DELETE /orgs/{org}/copilot/billing/selected_users (or /selected_teams) to add or cancel seats. The token needs the manage_billing:copilot scope, and a cancelled seat stays active until the end of the billing cycle.
- Copilot audit log events start with copilot. Search action:copilot.
- Logged events include seats added or cancelled, policy changes and content exclusion changes.
- GET /orgs/{org}/copilot/billing shows the subscription settings and seat counts.
🎯 Exam tip: "Who changed a Copilot policy?" = audit log, search action:copilot.
⚠️ Watch out: Expecting a cancelled seat to stop working immediately.