Does GitHub Copilot use your code to train models?
For Copilot Business and Enterprise, no — GitHub does not use your prompts, suggestions, or code to train its models. For individual plans (Free/Pro), GitHub gives you a setting to opt out of having your prompts and suggestions used to improve the models. Your private repository code is never used as training data by default.
Why — the first-principles explanation
The fear behind this question is simple: if you type proprietary code into Copilot, does it become fuel for the next model that a competitor might use? The answer depends on which plan you're on, because GitHub deliberately separated business customers from individuals.
For Copilot Business and Enterprise, GitHub's policy is clear: your code snippets, prompts, and the suggestions you receive are not used to train the underlying models. Companies won't pay to have their intellectual property leak into a shared model, so this is a core selling point of the paid business tiers.
For individual plans (Free and Pro), GitHub collects prompt and suggestion data by default to help improve the product — but it provides an opt-out toggle. Flip it off, and your prompts and suggestions are excluded from model training. Either way, the content of your private repositories is not scooped up as training data; the distinction is about the telemetry of your Copilot interactions, not your codebase at large.
The deeper principle is a trust-versus-improvement trade-off. Usage data makes models better, but sensitive code makes users nervous. GitHub's design lets each group choose: businesses get a hard no by default, and individuals get a switch. If you handle confidential code, the safe move is Business/Enterprise or turning the individual opt-out off — and always checking your current privacy settings, since policies evolve.
An example that makes it click
Think of a tutor who helps you write essays. A business contract says, 'The tutor will never reuse your essays to teach other students' — that's the Business/Enterprise promise. A casual arrangement says, 'By default I might use your essays as examples, but if you ask me not to, I won't' — that's the individual plan with its opt-out switch.
Either way, the tutor never sneaks into your locked filing cabinet to read all your old essays — that's your private repositories, which aren't used as training data. The only question is whether the notes from today's session get reused, and you control that.
How to do it
- Check which plan you're on: Business and Enterprise never use your code or prompts for training.
- On an individual plan (Free or Pro), open your Copilot settings on github.com.
- Find the setting about allowing GitHub to use your data to improve the product.
- Turn off the option to use your prompts and suggestions for model training.
- For maximum assurance with sensitive code, use a Business or Enterprise plan.
Key facts
- Copilot Business and Enterprise do not use your prompts, code, or suggestions to train models.
- Individual plans (Free/Pro) offer an opt-out toggle to exclude your prompts and suggestions from training.
- The content of your private repositories is not used as training data by default.
- This question is about interaction telemetry, not GitHub's original training on public code.
- Privacy settings can change over time, so verify your current Copilot data settings on github.com.
The AI pair-programmer built into your editor.
Affiliate link — we may earn a commission at no cost to you.▶ The 60-second explainer (script)
Does GitHub Copilot use your code to train its models? The answer depends on your plan — and it's mostly reassuring. If you're on Copilot Business or Enterprise, the answer is a flat no. Your prompts, your suggestions, and your code are not used to train the models. Companies won't pay to have their intellectual property leak into a shared brain, so GitHub makes that a core promise of the business tiers. If you're on an individual plan — Free or Pro — GitHub collects prompt and suggestion data by default to improve the product, but it gives you an opt-out switch. Flip it off in your Copilot settings, and your data is excluded from training. And here's the part everyone worries about: the actual code sitting in your private repositories is not scooped up as training data either way. This is only about the notes from your Copilot sessions, not your whole codebase. So if you handle confidential code, the safe moves are simple: use Business or Enterprise, or turn off the individual opt-out — and double-check your current privacy settings, because these policies do get updated.
What authoritative sources say
People also ask
Is my private repo code used to train Copilot?
No. The content of your private repositories is not used as training data. The question is only about the prompts and suggestions from your Copilot sessions.
How do individuals opt out?
On a Free or Pro plan, open your Copilot settings on github.com and turn off the option that lets GitHub use your prompts and suggestions to improve the models.
Do businesses need to opt out?
No. For Business and Enterprise, prompts, code, and suggestions are never used for training by default, so there's nothing to opt out of.
Could these policies change?
Yes. Data policies evolve, so it's wise to review your current Copilot privacy settings periodically on github.com.