To use GitHub Copilot in VS Code, you must first install the extension and sign in with a GitHub account that has an active Copilot plan. Here’s how to do it:
- Open VS Code and click the gear icon to access extensions view.
- Then, go to the "Extensions" view.
- Search for "GitHub Copilot Chat" and click 'Install' to add the extension authored by GitHub. This will automatically install both GitHub Copilot and GitHub Copilot Chat extensions.
- Click "Continue" to choose an account for Visual Studio Code.
- Follow the prompts in your browser and click 'Authorize Visual-Studio-Code' to authorize VS Code.
- Open the Copilot Chat view and in the chat input field, click the "Create new Edit session" button.
- Choose a simple prompt.
- You can also reference files using the #file command in your prompt.
- If the initial changes aren't exactly right, you can enter a follow-up prompt in the same session to refine them
- You can select "Accept all". Copilot Edits is best for making quick, specific updates across a defined set of files with granular review control.



