GitHub Copilot: Beginner
GitHub Copilot is GitHub and Microsoft’s AI coding assistant. It lives inside your editor (VS Code is its main home) and you’ll meet it in two places first: inline completions as you type, and Copilot Chat for questions and edits in plain English. This guide gets you installed and productive.
What you need
Section titled “What you need”- VS Code installed
- A GitHub account
- A Copilot plan on that account: Free, Pro, Pro+, or a seat from a Business/Enterprise org
Install
Section titled “Install”-
Open VS Code and go to the Extensions view (Ctrl/Cmd+Shift+X).
-
Search for GitHub Copilot and install it. Recent VS Code builds may already include it.
-
Sign in with your GitHub account when prompted.
-
Confirm the account has an active Copilot plan.
Inline completions
Section titled “Inline completions”As you type, Copilot suggests code as grayed-out “ghost text”.
| Key | What it does |
|---|---|
Tab | Accept the suggestion |
Esc | Dismiss it |
Copilot also offers Next Edit suggestions: after you make a change, it can predict the next edit it expects and point you to it.
Copilot Chat
Section titled “Copilot Chat”Open the Chat view to ask questions in plain English.
⌃⌘I Ctrl+Alt+I Select the code you want Copilot to focus on, then ask. A few good first prompts:
Explain what this file does.Why might this function return undefined?Add error handling to the selected code.Copilot answers in the panel and can hand you code to apply with a click.
Three habits that make it work
Section titled “Three habits that make it work”- Be specific. “Fix this” is weak. “This loop skips the last item, fix it” gives Copilot something to work with.
- Verify before you trust. Treat every suggestion as a draft to review, not an answer to accept blindly.
- One task per chat. Start a fresh conversation when you switch topics. A focused thread gives better answers.
You’re done when…
Section titled “You’re done when…”- ✅ Copilot is installed and signed in in VS Code
- ✅ You’ve accepted an inline completion with
Tab - ✅ You’ve asked Copilot Chat a question about your own code
Next step
Section titled “Next step”New to how these tools think? Skim the Foundations first: they explain why context matters more than clever prompts.