---
title: How to configure GitHub Copilot not to train on your code
url: https://roboin.io/article/en/2024/03/18/how-to-opt-out-from-git-hub-copilot-model-training/
description: GitHub Copilot may collect code snippets written by users and use
  them to improve its models. In this article, I explain how to opt out so that
  GitHub Copilot data is not used for AI training.
publishedDate: 2026-03-25T21:31:07.130Z
modifiedDate: 2026-03-25T21:31:07.130Z
thumbnail: https://roboin.io/api/media/file/image-1697.png
thumbnailAlt: GitHub Copilotの公式サイトのスクリーンショット
thumbnailCaption: N/A
---

# How to configure GitHub Copilot not to train on your code

GitHub Copilot includes various features that can greatly improve productivity, such as code autocompletion and agent mode.

However, GitHub Copilot may collect code snippets written by users and use them to improve its models.

In this article, I explain how to opt out so that GitHub Copilot data is not used for AI training.

## Data collection in GitHub Copilot

![GitHub Copilotの公式サイトのスクリーンショット](https://roboin.io/api/media/file/image-1697.png)
*Image: From "[GitHub Copilot · Your AI pair programmer](https://github.com/features/copilot)"*

First, I explain how GitHub Copilot collects and uses data. GitHub Copilot is built into IDEs and editors or runs as an extension.

GitHub says it does not claim direct ownership over code written by users in IDEs and editors, but data such as Copilot suggestions, inputs and code snippets sent to Copilot, and interactions with Copilot are used for AI training.

I introduce what specific kinds of data are used for training in the following article.

[GitHub to use Copilot data for AI training from April 24; how to opt out?](https://roboin.io/article/en/2026/03/26/github-to-use-copilot-data-for-ai-training/)

## Opt-out steps

You can opt out of GitHub Copilot data collection by following these steps.

<Steps>
  Click your profile image shown in the upper-right corner of GitHub, and open [Copilot settings]

  ![GitHubのプロフィールアイコンの下にメニューが表示されており、その中に［Copilot settings］という項目が含まれている](https://roboin.io/api/media/file/copilot-settings-in-github-profile-menu.png)

  Scroll down and set [Allow GitHub to use my data for AI model training] in the [Privacy] section to [Disabled]

  ![設定の［Privacy］セクションに［Allow GitHub to use my data for AI model training］という項目が表示されているスクリーンショット](https://roboin.io/api/media/file/github-copilot-training-optout-settings.png)
</Steps>

:::tip
It may take up to 30 minutes for the setting to take effect. Restarting your editor will apply the setting immediately.
:::

## Conclusion

I explained how to exclude your code from GitHub Copilot model training.

You can exclude your code by changing the data collection setting from the GitHub Copilot settings screen, so use this article as a reference and change the setting as needed.

## References

- [Configuring GitHub Copilot settings on GitHub.com - GitHub Docs](https://docs.github.com/en/copilot/configuring-github-copilot/configuring-github-copilot-settings-on-githubcom#enabling-or-disabling-prompt-and-suggestion-collection)
- [GitHub Terms for Additional Products and Features - GitHub Docs](https://docs.github.com/en/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot)

## Update history

- March 26, 2026: Updated with the latest information