How to Configure GitHub Copilot Settings for Data Training and Privacy
Starting on April 24, 2026, GitHub updated its data training policies for Copilot Free, Pro, and Pro+ plans to enable interaction logging by default. Individual subscribers must manually disable this collection in their profile settings to prevent local code snippets from being used for AI training. This step-by-step guide explains how to opt out of data training, manage organization-level policies, and establish secure context boundaries to protect your code.
How GitHub Copilot defaults to data training for individual plans
Starting on April 24, 2026, GitHub updated its data training policy for individual Copilot plans, including Free, Pro, and Pro+, to enable model training on user interactions by default. Individual subscribers who do not manually disable this collection will have their prompts, code snippets, and contextual metadata processed to improve future generative models. This defaults-on model training approach raises significant privacy concerns for developers working with proprietary logic, API keys, or custom algorithms in their local editors.
To prevent your code from being ingested into GitHub's training sets, individual users must manually opt out of data sharing on GitHub.com. The process takes less than two minutes:
- Sign in to your GitHub account on GitHub.com.
- Click your profile picture in the upper-right corner of the page, then select settings.
- In the left sidebar, locate the Copilot section under the code planning and automation category.
- Scroll to the privacy section of the Copilot page to locate the setting labeled 'Allow GitHub to use my data for AI model training'.
- Adjust the dropdown selection from Allowed to Disabled.
- Verify the change by refreshing the page and checking that the setting remains disabled.
Disabling this setting does not affect the performance of the assistant. The editor extension will still provide code completions, chat answers, and refactoring tips. The difference is that your interaction data will be processed in memory in real time to generate suggestions and then discarded, rather than stored on disk for model training.
If you manage multiple GitHub accounts, such as a personal account and an open source contributor profile, you must repeat this configuration for each profile individually. Privacy preferences do not propagate across distinct user accounts automatically. Developers using individual licenses to write code for commercial employers must verify their settings to prevent accidental exposure of enterprise intellectual property. The default policy does not apply to users with active education licenses, such as verified students and teachers accessing Copilot Pro, but checking the settings panel is still recommended to confirm that telemetry collection is inactive.
What telemetry and interaction datasets the editor extension collects
To manage coding environment security, developers must understand the specific datasets transmitted by the AI extension. The extension communicates three primary categories of information back to GitHub's servers: prompts, suggestions, and telemetry. Prompts are the contextual fragments sent from your editor to the model to request a completion. Suggestions are the resulting code blocks returned by the model. Telemetry refers to usage metrics, including latency, accept and reject rates for completions, and click events within the user interface.
Many developers ask: does copilot train on my code? The answer depends entirely on your subscription type and your privacy settings. If you use a Free or Pro account and leave the training option enabled, GitHub uses both prompts and suggestions to train its models. If you opt out or use a managed corporate plan, your code is not used for training, but it is still transmitted to generate suggestions.
The context window sent to the model spans much further than the active line of code. The extension scans neighboring files currently open in editor tabs to build a broader understanding of the codebase structure. If files containing environment variables, API secrets, or private certificates are left open in adjacent tabs, their content can be parsed to build the prompt context.
In addition to open tabs, the language server indexes closed files within the active project directory tree to resolve class definitions and symbol references. This indexing means that a coding assistant can inspect closed configuration files in your repository to provide completions in a different file. This background indexing can lead to inadvertent collection of private endpoints or internal routing setups.
To build this prompt context, the local extension uses a ranking algorithm that selects snippets from other open tabs based on their relevance to the file currently being edited. Relevant files are determined using path similarity, shared imports, and language type. For instance, if you are editing a controller class, the assistant is highly likely to pull snippets from the corresponding model class and utility modules. This automated context collection means that any proprietary logic or private configuration residing in an open file could be uploaded as part of a prompt context window, even if you never invoke Copilot in that specific file.
Steps for organization administrators to restrict telemetry sharing
For development teams operating within a shared corporate environment, individual user settings are overridden by organization policies. If an organization administrator restricts data sharing or telemetry, individual developers cannot enable it for their work within the organization. Organization owners can manage Copilot policies by navigating to their organization page on GitHub.com, clicking Settings, and selecting Copilot in the left sidebar.
Admin controls provide several switches to restrict data exposure. Under the policies section, administrators can configure matching suggestions against public code. If set to Block, Copilot checks suggestions against public repositories on GitHub. If there is a matching segment of code, the suggestion is blocked. This protects organizations from copyright issues.
Administrators can also control the activation of third-party partner agents in their repositories, such as Anthropic Claude or OpenAI Codex. They can enable or disable web search within Copilot Chat, which restricts the assistant from querying external search engines like Bing for answers to developer questions.
Enterprise and organization accounts are protected by GitHub's Data Protection Agreement. This agreement prevents GitHub from using any customer code, prompt data, or completion history to train public AI models. For these accounts, the data training toggle is hidden entirely, ensuring that enterprise intellectual property remains isolated from public training runs.
Enterprise administrators have access to detailed audit logs that track Copilot usage, seat assignments, and feature activation. These logs show when users accept suggestions, which repositories are being accessed, and whether any public code matches occurred. By maintaining strict control over these settings, organizations can ensure that their developers use AI tools in compliance with internal security guidelines. If a developer uses a personal Copilot subscription on a corporate machine, organization admins can use enterprise endpoint management tools to block connection requests to GitHub's completion servers, forcing the use of the secure, organization-managed plan.
Isolate Your Private Codebases from AI Model Training
Fast.io provides secure workspaces for development teams and autonomous agents. Scope context boundaries, prevent local telemetry leaks, and auto-index documents. Starts with a 14-day free trial.
Preventing contextual code leaks using local ignore policies
Relying on settings panels alone can be risky. Developers can also enforce local restrictions within their editors to block the extension from accessing sensitive files. In VS Code, JetBrains, or other compatible IDEs, developers can configure ignore rules using a file named .copilotignore in the root of their repository. This file uses standard glob patterns, similar to a .gitignore file, to declare which paths the coding assistant must not index.
When the extension encounters a file matched by a .copilotignore pattern, it blocks that file from being read into the context window. Suggestions will not draw from those files, and prompts will not include them as neighboring files. This configuration is particularly useful for excluding directories that contain local database caches, build artifacts, or secret configuration files.
To implement a local ignore policy, create a .copilotignore file at the root of your project directory and add the sensitive file paths:
.env
config/secrets.yaml
db/*.sqlite3
certs/
By placing this file in your repository, you ensure that anyone cloning the project inherits the same context constraints. This prevents team members from accidentally sending secret keys or internal documentation to the completion servers. It also reduces the memory footprint of the language server by preventing it from indexing unnecessary directories.
The .copilotignore file must be committed to the repository to apply consistently across a team. If the file is only saved locally without being tracked by Git, other contributors will not benefit from the same security boundaries. When testing ignore patterns, developers should verify that the extension is indeed ignoring the targeted paths. You can do this by opening the Copilot output logs in your editor and checking for any blocked file warnings. If a file is matched, the logs will show that the path was excluded from the prompt generation step, confirming that the local ignore rules are working correctly.
Establishing secure workspace boundaries using Fast.io
Managing local editor settings and ignore files is only half the battle. If sensitive project documents, client reports, or database schemas reside in the developer's active folder structure, AI assistants will continue to scan them. Traditional storage options like local directories, S3 buckets, or Google Drive fail to provide dynamic context boundaries, forcing developers to build complex sync processes to isolate files.
Fast.io provides an intelligent workspace platform that secures data at the source. Instead of keeping sensitive design documents, client briefs, or databases in the active coding directory where editor extensions can parse them, teams can structure their documents in Fast.io workspaces. The platform offers granular permissions at the workspace, folder, and file level, keeping sensitive information isolated from the local development context.
When teams enable Intelligence Mode on a workspace, Fast.io indexes files automatically. This allows semantic search and citation-backed query retrieval without exposing files to the local active editor window. Developers and autonomous AI agents can query the workspace programmatically using the consolidated MCP tools, which expose workspaces via Streamable HTTP at /mcp and legacy SSE at /sse. This configuration allows agents to search and retrieve documents as needed, ensuring they only access the files within specified workspace boundaries.
Every organization starts with a 14-day free trial, which requires a credit card. Paid plans are Starter at $29/mo, Business at $99/mo, and Growth at $299/mo. For more details, see the Fast.io pricing page.
Using these secure workspaces, developers can apply Metadata Views to extract structured data from files without reloading the entire document text. AI agents and humans can co-edit specifications via Collaborative Notes. Once the work is complete, ownership can be transferred from the agent to a human, with every action logged in the append-only audit trail and tracked through per-file version history. This combination of local IDE telemetry controls and scoped workspaces protects proprietary code from being leaked to public models.
Because Fast.io allows one-time cloud import from Google Drive, Dropbox, OneDrive, and Box, teams can migrate their existing files into a secure, agent-ready workspace without local download and upload steps. Once imported, these files are indexed for hybrid search, which supports full-text, semantic, and metadata-value queries. This indexing allows developers to find code patterns, documentation, and asset metadata across massive archives without having to clone those archives onto their local machines, completely eliminating the risk that a local coding assistant will scan them. The activity feed and events log ensure that all agent reads and writes are fully auditable, providing compliance teams with complete visibility into data access patterns.
Frequently Asked Questions
Does GitHub Copilot train on my private repositories?
GitHub Copilot does not use private repositories for model training if you use an individual plan and have disabled training in your settings. For Copilot Business and Copilot Enterprise subscribers, training on customer code is blocked by default under the Data Protection Agreement, regardless of individual settings.
How do I turn off data sharing in GitHub Copilot?
To turn off data sharing, log in to GitHub.com, navigate to your Settings page, and click Copilot under the sidebar. Locate the option labeled 'Allow GitHub to use my data for AI model training' and change the dropdown selection to Disabled.
What is the difference between individual and business settings?
Individual plans default to model training enabled, requiring users to opt out manually. Business and Enterprise plans disable training automatically, and settings are managed by organization administrators under centralized policies.
Does configuring .copilotignore block telemetry collection?
A .copilotignore file prevents the Copilot editor extension from scanning and reading specified files as context for suggestions. However, it does not disable general usage telemetry collection or data training options in your account settings. You must disable those separately in your GitHub account and editor settings.
Related Resources
Isolate Your Private Codebases from AI Model Training
Fast.io provides secure workspaces for development teams and autonomous agents. Scope context boundaries, prevent local telemetry leaks, and auto-index documents. Starts with a 14-day free trial.