# Does GitHub use your code to train Copilot?

Source: https://codelifter.com/forum/posts/does-github-use-your-code-to-train-copilot/
Site: CodeLifter Forum, category AI code policies
Published: 2026-11-22. Updated: 2026-11-22. Replies: 0.

## Question by CodeLifter editors (staff), 2026-11-22

GitHub uses your Copilot interactions to train AI models if you are on Copilot Free, Pro, Pro+ or Max and have not opted out; that policy started on 24 April 2026. Copilot Business and Enterprise data is excluded by contract. GitHub says it does not train on the stored contents of private repositories, only on what you send to Copilot.

## What changed on 24 April 2026?

On 25 March 2026 GitHub announced [updates to its Privacy Statement and Terms of Service](https://github.blog/changelog/2026-03-25-updates-to-our-privacy-statement-and-terms-of-service-how-we-use-your-data). GitHub said that "from April 24 onward we will begin using interaction data", which it lists as "inputs, outputs, code snippets, and associated context", from Copilot Free, Pro and Pro+ users "to train and improve our AI models unless you opt out."

Two definitions help. An **input** is what you send to an AI feature: a prompt, the open file, the code around your cursor. An **output** is what comes back: a suggestion, a chat answer, a generated file. GitHub calls the two together "interaction data". It is not the same thing as your repository.

The terms behind this are Section J of the [GitHub Terms of Service](https://docs.github.com/en/site-policy/github-terms/github-terms-of-service), effective 27 April 2026. Section J.3 grants GitHub and its affiliates "a license to collect and use your Inputs and Outputs to develop, train and improve artificial intelligence and machine learning models", unless you opt out or your use is governed by a GitHub Customer Agreement or volume licensing agreement.

## Which plans are affected?

As of the [Copilot settings documentation](https://docs.github.com/en/copilot/how-tos/manage-your-account/manage-policies) read on 16 October 2026, which lists Copilot Max alongside the plans named in the March announcement:

| Plan | Interaction data used for training? | How you control it |
| --- | --- | --- |
| Copilot Free | Yes, unless you opt out | Personal Copilot settings |
| Copilot Pro, Pro+ and Max | Yes, unless you opt out | Personal Copilot settings |
| Copilot Business and Enterprise | No | Covered by GitHub's Data Protection Agreement; the setting is not shown |

The same page says: "GitHub does not use Copilot Business or Copilot Enterprise customer data to train AI models." If your employer gave you a seat, you are in the last row; the [employer policies thread](/forum/posts/do-employers-allow-ai-coding-assistants-and-what-do-their-policies-say/) covers what that seat does and does not control. If you are deciding between plans for personal use, the thread on [whether GitHub Copilot is free](/forum/posts/is-github-copilot-free-and-what-does-the-free-plan-include/) lists what each tier includes.

## Does GitHub train on the code in your repositories?

This is where the answer splits three ways.

1. **Private repositories, at rest.** The March announcement says: "We do not use private repository content at rest to train AI models." Section E of the Terms adds that if you provide private repository content as input to an AI feature, GitHub "may use that Input" to improve its AI features, subject to your opt-out, and "will not otherwise use your private repository contents to develop or improve the Service."
2. **Private code you send to Copilot.** When Copilot reads the file you are editing to make a suggestion, that context is an input. It is covered by the training licence unless you opt out.
3. **Public repositories.** Section D.4 of the Terms gives GitHub and its affiliates the right to use "Your Content" to develop and improve the service "including by training AI Features". Section J.3 says the opt-out "does not apply to the license granted in Sections D.4-D.8 or to any Content that does not constitute Input or Output (including Content stored in public repositories)." The Copilot setting does not cover public code.

GitHub's [responsible use page for inline suggestions](https://docs.github.com/en/copilot/responsible-use/inline-suggestions) describes the foundation models behind Copilot as trained on "publicly available text and code". It does not list which repositories.

## How do you opt out?

1. Sign in to GitHub with the account that holds your Copilot plan.
2. Click your profile picture in the upper-right corner, then **Copilot settings**.
3. Find **Allow GitHub to use my data for AI model training** and choose **Disabled**.
4. If the setting is missing, check that you are not signed in with a Business or Enterprise seat; the docs say the setting is not displayed for those plans.

![Four steps to opt out of GitHub Copilot using your data for AI model training](/forum/img/posts/copilot-training-opt-out-steps.webp "The Copilot training opt-out in four steps, as described in this article")

The announcement adds that if you had already opted out of the older setting for product improvements, "your preference has been retained."

## What does opting out not change?

- **Earlier data.** Section J.3 says that after you opt out, GitHub will not collect or use your inputs and outputs "from the effective date of your opt-out going forward." It does not promise to remove what was collected before.
- **Public code.** As above, the opt-out does not touch content in public repositories.
- **Other tools.** The setting covers GitHub and its affiliates. A different assistant, or an MCP server that sends your files to another service, has its own terms.
- **Ownership.** Section J.2 says "GitHub does not claim ownership of your Input or Output." Training and ownership are separate questions. The CodeLifter desk article [Who owns AI-generated code?](https://codelifter.com/provenance/who-owns-ai-generated-code/) covers the ownership side.

Policies like this one change, and the [AI code policy tracker](https://codelifter.com/provenance/ai-code-policy-tracker/) on the parent site is where CodeLifter keeps dated notes on vendor and project rules.

## Short version

- Since 24 April 2026, GitHub may train on Copilot prompts, suggestions and code context from Free, Pro, Pro+ and Max users unless they opt out.
- Business and Enterprise data is not used for training.
- GitHub says it does not train on private repository contents at rest; code you send to Copilot from a private repository counts as input.
- Opt out in **Copilot settings** under "Allow GitHub to use my data for AI model training"; it does not cover public repositories or data collected before.

---
Cite as: CodeLifter Forum, "Does GitHub use your code to train Copilot?", https://codelifter.com/forum/posts/does-github-use-your-code-to-train-copilot/, accessed 2026-11-22.
