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

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.
Opt-out steps
You can opt out of GitHub Copilot data collection by following these steps.
Click your profile image shown in the upper-right corner of GitHub, and open [Copilot settings]
![GitHubのプロフィールアイコンの下にメニューが表示されており、その中に[Copilot settings]という項目が含まれている](/_next/image/?url=%2Fapi%2Fmedia%2Ffile%2Fcopilot-settings-in-github-profile-menu.png&w=1080&q=75)
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]という項目が表示されているスクリーンショット](/_next/image/?url=%2Fapi%2Fmedia%2Ffile%2Fgithub-copilot-training-optout-settings.png&w=3840&q=75)
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
- GitHub Terms for Additional Products and Features - GitHub Docs
Update history
- March 26, 2026: Updated with the latest information
Share this article
Follow us for updates
Adding us to your preferred sources on Google makes it easier to find our articles on Google. Also, be sure to follow us on X and our RSS feed.
Next articles
- GitHub to use Copilot data for AI training from April 24; how to opt out?
- GitHub removes manual model selection from Copilot Free and Student plans, leaving Auto as the sole option
- GitHub Copilot is moving to credit-based billing with a full breakdown of what changes in June
- GitHub Copilot pauses new sign-ups: why you can’t register and what alternatives exist
- GitHub temporarily suspends new free trials for Copilot Pro as it steps up measures against increasing abuse
-1.png&w=1080&q=75)
I've been using JavaScript more than my native language since birth. I am nowhere and everywhere on the internet.
I build web apps and browser extensions in TypeScript as a web frontend programmer. I released Shadowban Scanner, a tool that detects shadowbans on X, and Restore Link Card, a tool that brings back link cards. Media outlets in Japan and abroad covered both tools. For iGEM 2023, I built the Wiki for Team Japan-United and helped the team win the Grand Prize. On my blog, I cover news about X and social media, test and troubleshoot bugs, and share frontend development insights.







![[新しいXチャットへようこそ]というテキストが画面に大きく表示されており、その下には次の3つの説明が表示されている。[エンドツーエンドの暗号化:メッセージは、端末にかかわらずエンドツーエンドで暗号化されています。][最先端のプライバシー:Xを含め、他の人がメッセージを読むことはできません。][パスコードを設定:メッセージを保護するため、4桁のパスコードを設定してください。]これらの説明の下には、[パスコードを作成]という大きなボタンが配置されている](/_next/image/?url=%2Fapi%2Fmedia%2Ffile%2Fwelcome-to-new-chat.png&w=1920&q=75)

![[Search Engine Selector]というアプリからの通知のスクリーンショット。[ブラウザと検索サービスを選択]というタイトルで、本文には[ウェブページを表示しリンクを開くアプリと、検索サービスアプリを選択してください]と書かれている。通知の下部には[アプリを選択してください]というボタンが表示されている](/_next/image/?url=%2Fapi%2Fmedia%2Ffile%2Fandroid-search-engine-selector-notification.png&w=3840&q=75)

