How to set up GitHub Copilot in VS Code and run your first task
GitHub Copilot is GitHub's AI coding assistant, and VS Code has it built in. This guide covers installing VS Code, signing in to Copilot, turning off training on your data, and giving the agent a first small task. Everything here is quoted from VS Code's setup, Copilot setup and agents quickstart pages, and GitHub's Copilot docs, checked Oct 2026.
Not affiliated with or endorsed by GitHub or Microsoft. Check their current docs before relying on these details.
Our tool page: GitHub Copilot
What you need first
VS Code's Copilot page says "To use Copilot in VS Code, you need access to GitHub Copilot with your GitHub account." If you don't have a plan yet, "you'll be signed up for the Copilot Free plan and get a monthly allowance of inline suggestions and AI credits." GitHub doesn't give exact numbers for that allowance. For paid plans, see GitHub's Copilot plans page (checked Oct 2026).
System requirements, from VS Code's docs:
| Requirement | |
|---|---|
| Size | "a small download (< 200 MB)" with "a disk footprint of < 500 MB" |
| Hardware | "1.6 GHz or faster processor", "1 GB of RAM" |
| Windows | "Supported versions of Windows client (64-bit)" |
| macOS | "macOS versions with Apple security update support" |
| Linux | Ubuntu Desktop 20.04, Debian 10, Red Hat Enterprise Linux 8, Fedora 36 |
The version was 1.142 when we checked (Oct 2026).
Step 1: Install VS Code
Download it from code.visualstudio.com. From the setup docs:
- Windows: "Download the User Setup installer (.exe). Run the installer and follow the prompts." It "adds code to your PATH, so you can also open a folder from the terminal with code ."
- macOS: "Open the .dmg file and drag Visual Studio Code.app to the Applications folder." To use
codein the terminal, run "Shell Command: Install 'code' command in PATH". - Linux: for a .deb file, "Install it with sudo apt install ./<file>.deb". For an .rpm file, "Install it with sudo dnf install ./<file>.rpm". The docs say "Installing the package sets up the apt or dnf repository for automatic updates."
Step 2: Open a project
"Select File > Open Folder... Select an existing project folder." If VS Code asks whether you trust the folder, the docs say to "review the folder contents and choose whether you trust its authors. Only trust code from sources you know."
Step 3: Sign in to Copilot
VS Code has built-in AI features. The docs note that "AI features are optional. You don't need an account to use the core editor." To turn them on: "Hover over the Copilot icon in the Status Bar and select Use AI Features. Choose a sign-in method and follow the prompts."
You can also open the Command Palette (Ctrl+Shift+P, or Shift+Cmd+P on Mac) and run "GitHub Copilot: Sign in".
Step 4: Turn off training on your data
GitHub's docs say: "Starting on April 24, 2026, if you have a Copilot Free, Copilot Pro, Copilot Pro+, or Copilot Max plan, GitHub may use your interactions with GitHub features and services—including inputs, outputs, code snippets, and associated context—to train and improve AI models."
To opt out on GitHub: "click your profile picture, then click Copilot settings. Select the 'Allow GitHub to use my data for AI model training' dropdown menu and click Disabled." GitHub also says it "does not use Copilot Business or Copilot Enterprise customer data to train AI models."
VS Code also notes that telemetry for free Copilot "is currently enabled", and you can turn it off by setting telemetry.telemetryLevel to off. For more, see our guide on whether AI coding tools train on your code.
Step 5: Your first task
The quickstart notes that these "Requests ... use AI credits from your Copilot plan." Open the Chat view with Ctrl+Alt+I (Ctrl+Cmd+I on Mac) and select + to start a new chat. For permissions, pick "Manual permissions", which "Requests your approval for running tools or accessing resources."
Here is VS Code's example prompt (we haven't tried it ourselves). It builds a tiny app, so try it in a new empty folder:
Create a task list web app in a single index.html file with embedded CSS and JavaScript. Let me add, complete, and delete tasks. Save the tasks in local storage so they persist after a page reload. Use no external libraries.
"Follow the agent's progress and review each approval request before you accept it." When it's done, "Inspect each pending edit in the editor. Use Keep to acknowledge it or Undo to revert it."
To undo a whole request: hover over an earlier request and select Restore Checkpoint. The docs warn that this "doesn't reverse terminal commands, network requests, deployments, or changes to external services." Stopping a request midway doesn't undo anything either. So keep approvals on manual, and commit to Git before you start.
Step 6: Give it project instructions
"For Copilot sessions, use .github/copilot-instructions.md for project-wide guidance." You can also "enter /init in a chat session to create starter custom instructions for a project." Our Copilot custom instructions guide walks through it.
Updating, turning it off, and removing it
To update, use "Check for Updates" in VS Code. To turn off Copilot without uninstalling, use the chat.disableAIFeatures setting. The docs say this "disables and hides features like chat or inline suggestions in VS Code and disables the Copilot extensions."
To uninstall VS Code, the docs say:
- Windows: "Search for Add or Remove Programs and find Visual Studio Code in the Apps > Apps & features list. Select Uninstall"
- macOS: "Right-click on the Visual Studio Code application and select Move to Trash."
- Linux: "use your package manager's uninstall or remove option."
To remove your settings too, the docs list these folders:
- Windows:
%APPDATA%\Code,%USERPROFILE%\.vscode-sharedand%USERPROFILE%\.vscode - macOS:
$HOME/Library/Application Support/Code,~/.vscode-sharedand~/.vscode - Linux:
$HOME/.config/Code,~/.vscode-sharedand~/.vscode
Next steps
- Write project rules: Copilot custom instructions guide
- Or use one instructions file: AGENTS.md and CLAUDE.md guide
- Keep secrets out of its reach: keeping secrets safe with AI coding tools
- Other install guides: Claude Code, Codex CLI and Cursor
Not affiliated with or endorsed by GitHub or Microsoft. Check their current docs before relying on these details.