Setting up Copilot for learning to code - GitHub Docs
https://docs.github.com/en/get-started/learning-to-code/setting-up-copilot-for-learning-to-code • 196 KB fetched Open original page
Setting up Copilot for learning to code - GitHub Docs Skip to main content
GitHub Docs Version: Free, Pro, & Team
Search or ask Copilot Search or ask Copilot
Select language: current language is English
Search or ask Copilot Search or ask Copilot
Open menu
Collapse sidebar Expand sidebar
Scroll breadcrumbs left
* Home
* Get started
* Learn to code
* Set up Copilot for learning
Scroll breadcrumbs right
Get started
*
*
* Start your journey
* What is GitHub?
* Learning resources
* Create your repository
* Plan your work
* Connect locally
* Write and store code
* Review changes
* Deploy automatically
* Onboarding
* Getting started with your GitHub account
* Getting started with GitHub Team
* Getting started with the GitHub Enterprise Cloud trial
* Getting started with GitHub Enterprise Cloud
* Using GitHub
* Hello World
* GitHub flow
* Connecting to GitHub
* Communicating on GitHub
* Feature preview
* Supported browsers
* GitHub Mobile
* Allow network access
* Connectivity problems
* Learning about GitHub
* GitHub's plans
* GitHub language support
* Types of GitHub accounts
* Access permissions
* GitHub Advanced Security
* Changes to GitHub plans
* GitHub glossary
* Learn to code
* Set up Copilot for learning
* Get started with Git
* Finding example code
* Reuse people's code
* Local development
* Debug with Copilot
* Getting feedback on your code
* Storing secrets safely
* Secure your code
* Secure your dependencies
* Accessibility
* Manage theme settings
* Keyboard shortcuts
* GitHub Command Palette
* Writing on GitHub
* Start writing on GitHub
* Quickstart
* About writing & formatting
* Basic formatting syntax
* Work with advanced formatting
* Organized data with tables
* Collapsed sections
* Create code blocks
* Create diagrams
* Mathematical expressions
* Auto linked references
* Attaching files
* About tasklists
* Permanent links to code
* Using keywords in issues and pull requests
* Work with saved replies
* About saved replies
* Creating a saved reply
* Editing a saved reply
* Deleting a saved reply
* Using saved replies
* Share content with gists
* Creating gists
* Forking and cloning gists
* Saving gists with stars
* Moderating gist comments
* Explore projects
* Discover projects
* Contribute to a project
* Finding open source projects
* Contribute to open source
* Use Copilot to explore projects
* Save repositories with stars
* Following people
* Following organizations
* Git basics
* Set up Git
* Set your username
* Caching credentials
* Repeated credential prompts
* macOS Keychain credentials
* Git workflows
* About remote repositories
* Manage remote repositories
* Associate text editors
* Handle line endings
* Ignoring files
* Git cheatsheet
* Using Git
* About Git
* Push commits to a remote
* Get changes from a remote
* Non-fast-forward error
* Splitting a subfolder
* About Git subtree merges
* About Git rebase
* Git rebase
* Resolve conflicts after rebase
* Special characters in names
* Maximum push limit
* Archive account and public repos
* Request account archive
* GitHub Archive program
* Using GitHub Docs
* Docs versions
* Hover cards
* GitHub Docs API
* GitHub Certifications
* About GitHub Certifications
* Registering for an exam
Setting up Copilot for learning to code
Configure Copilot to help you learn coding concepts and actively build your programming skills.
Copy as Markdown
Learn to code with GitHub Copilot
Article 1 of 10
Next : Getting started with Git
In this article
* Can Copilot help me learn to code?
* Prerequisites
* Step 1: Disable Copilot inline suggestions
* Step 2: Add learning instructions
* Step 3: Use Copilot Chat to learn
Can Copilot help me learn to code?
Yes! Copilot can adapt to meet your changing needs throughout your coding journey. When you're an experienced developer, you'll use Copilot as a coding assistant. While you're learning to code, it's more beneficial as a supportive companion .
In this guide, you’ll learn how to set up Copilot to act as a tutor that will help you build a deep understanding of programming concepts, rather than relying on it to write your code for you. To optimize your learning, follow these steps for each repository you work on!
Prerequisites
This guide assumes that you'll use Copilot in VS Code. To get set up, see Set up Copilot in VS Code in the Visual Studio Code documentation.
Step 1: Disable Copilot inline suggestions
First, let's disable inline suggestions. This will give you the opportunity to deepen your understanding of programming concepts by writing more code yourself.
*
In VS Code, open your project.
*
Create a folder in the root directory called .vscode .
*
Inside .vscode , create a file called settings.json .
*
Add the following text to the file:
JSON {
"github.copilot.enable": {
"*": false
}
}
{
"github.copilot.enable" : {
"*" : false
}
}
*
Save the file. Copilot inline suggestions are now disabled for this project in VS Code.
Step 2: Add learning instructions
Now, let's provide Copilot Chat with instructions to act like a tutor that supports your learning.
*
Create a folder in the root directory called .github .
*
Inside .github , create a file called copilot-instructions.md .
*
Add the following text, or customize it for your personal learning goals:
Markdown I am learning to code. You are to act as a tutor; assume I am a beginner coder. Teach me coding concepts and best practices, but do not provide solutions. Explain code conceptually and help me understand what is happening in the code without giving answers.
Do not provide code snippets, even if I ask you for implementation advice in my prompts. Teach me all the basic coding concepts in your answers. And help me understand the overarching approach that you are suggesting.
Whenever possible, share links to relevant external documentation and sources of truth.
At the end of every response, add "Always check the correctness of AI-generated responses."
I am learning to code. You are to act as a tutor; assume I am a beginner coder. Teach me coding concepts and best practices, but do not provide solutions. Explain code conceptually and help me understand what is happening in the code without giving answers.
Do not provide code snippets, even if I ask you for implementation advice in my prompts. Teach me all the basic coding concepts in your answers. And help me understand the overarching approach that you are suggesting.
Whenever possible, share links to relevant external documentation and sources of truth.
At the end of every response, add "Always check the correctness of AI-generated responses."
*
Save the file. Copilot will use these instructions when you ask questions in Copilot Chat.
Step 3: Use Copilot Chat to learn
You're ready to start building real coding skills with Copilot's help!
Throughout your work on the project, engage in a long-running conversation with Copilot Chat . Treat it as your personal tutor , asking questions as they arise and using it to navigate challenges or clarify concepts.
Open Copilot Chat in VS Code
Copilot Chat is especially helpful for debugging your code. For step-by-step guidance, see Learning to debug with GitHub Copilot .
Up next
Getting started with Git
Step 1 of 10 in Learn to code with GitHub Copilot
Help and support
Did you find what you needed?
Yes No
Privacy policy Help us make these docs great!
All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.
Make a contribution Learn how to contribute
Still need help?
Ask the GitHub community
Contact support
Legal
* © 2026 GitHub, Inc.
* Terms
* Privacy
* Status
* Pricing
* Expert services
* Blog
Links found on this page
- Skip to main content [direct]
- GitHub Docs [direct]
- Get started [direct]
- Learn to code [direct]
- What is GitHub? [direct]
- Learning resources [direct]
- Create your repository [direct]
- Plan your work [direct]
- Connect locally [direct]
- Write and store code [direct]
- Review changes [direct]
- Deploy automatically [direct]
- Getting started with your GitHub account [direct]
- Getting started with GitHub Team [direct]
- Getting started with the GitHub Enterprise Cloud trial [direct]
- Getting started with GitHub Enterprise Cloud [direct]
- Hello World [direct]
- GitHub flow [direct]
- Connecting to GitHub [direct]
- Communicating on GitHub [direct]
- Feature preview [direct]
- Supported browsers [direct]
- GitHub Mobile [direct]
- Allow network access [direct]
- Connectivity problems [direct]
- GitHub's plans [direct]
- GitHub language support [direct]
- Types of GitHub accounts [direct]
- Access permissions [direct]
- GitHub Advanced Security [direct]
- Changes to GitHub plans [direct]
- GitHub glossary [direct]
- Get started with Git [direct]
- Finding example code [direct]
- Reuse people's code [direct]
- Local development [direct]
- Debug with Copilot [direct]
- Getting feedback on your code [direct]
- Storing secrets safely [direct]
- Secure your code [direct]
- Secure your dependencies [direct]
- Manage theme settings [direct]
- Keyboard shortcuts [direct]
- GitHub Command Palette [direct]
- Quickstart [direct]
- About writing & formatting [direct]
- Basic formatting syntax [direct]
- Organized data with tables [direct]
- Collapsed sections [direct]
- Create code blocks [direct]
- Create diagrams [direct]
- Mathematical expressions [direct]
- Auto linked references [direct]
- Attaching files [direct]
- About tasklists [direct]
- Permanent links to code [direct]
- Using keywords in issues and pull requests [direct]
- About saved replies [direct]
- Creating a saved reply [direct]
- Editing a saved reply [direct]
- Deleting a saved reply [direct]
- Using saved replies [direct]
- Creating gists [direct]
- Forking and cloning gists [direct]
- Saving gists with stars [direct]
- Moderating gist comments [direct]
- Discover projects [direct]
- Contribute to a project [direct]
- Finding open source projects [direct]
- Contribute to open source [direct]
- Use Copilot to explore projects [direct]
- Save repositories with stars [direct]
- Following people [direct]
- Following organizations [direct]
- Set up Git [direct]
- Set your username [direct]
- Caching credentials [direct]
- Repeated credential prompts [direct]
- macOS Keychain credentials [direct]
- Git workflows [direct]
|
|