Workflow guide
How to Connect GitHub to ChatGPT—and Explain Code with File Evidence
Choose which repositories ChatGPT may read, check one file you know, then ask for an explanation that separates what the code shows from what still needs testing.
Joining a codebase usually starts with the same questions: where does a request enter, what calls what, and which of these files actually matter? Answers live in the code, the README and whoever wrote it two years ago.
Connected ChatGPT can retrieve files from the repositories you allow and explain them. The useful habit is to make it name the repository and file path behind every claim, and to keep “the code does this” apart from “this is probably why” and “nobody has tested this.”
This walkthrough uses the GitHub app in ChatGPT. Product claims were checked against official OpenAI and GitHub documentation on October 28, 2026. AI assisted the research and writing. The prompts and the fictional example are Connector Scout editorial recommendations, not results from hands-on testing.
Quick answer
Open Settings > Plugins and select GitHub. You are sent to GitHub to install and authorize the ChatGPT app and choose which repositories it can access. ChatGPT then retrieves permitted files on demand; there is no synced index to build. The GitHub app in ChatGPT is read-only: use Codex, a separate product, to edit repository files and push changes. Check one README you know before asking about code. (OpenAI’s GitHub app guide)
- Setup path
- Settings > Plugins → GitHub → install and authorize on GitHub → select repositories
- Access
- Read-only, on demand, from repositories you selected
- New repos
- Usually appear within about 5 minutes
The walkthrough ends with your review. Installation and prompts are not substitutes for checking repository access, running the code and reading the files yourself.
What the GitHub app in ChatGPT does—and does not
When GitHub is connected, ChatGPT retrieves permitted repository content on demand, including code, README files and other documentation. This live access does not create a synced GitHub index, and per-repository indexing cannot be configured. (OpenAI’s GitHub app guide)
| What you want | Feature | Notes |
|---|---|---|
| Ask about code, READMEs and docs while chatting | GitHub app in ChatGPT (this guide) | Read-only; availability varies by plan and surface |
| Generate, edit and push code | Codex | A separate OpenAI product |
| React when a pull request opens or merges | An event-triggered task in Work | Separately configured; github.com only |
Which GitHub and ChatGPT feature fits what you want to do
Ask about code, READMEs and docs while chatting
- Feature
- GitHub app in ChatGPT (this guide)
- Notes
- Read-only; availability varies by plan and surface
Generate, edit and push code
- Feature
- Codex
- Notes
- A separate OpenAI product
React when a pull request opens or merges
- Feature
- An event-triggered task in Work
- Notes
- Separately configured; github.com only
The GitHub app reads repository content for analysis and search. ChatGPT can still draft code in the conversation; to have OpenAI’s coding agent edit repository files and push changes, use Codex. Availability also varies: some plans may offer GitHub in deep research or agent mode but not in standard chat. (OpenAI’s GitHub app guide)
Pull-request tasks are a separate Work feature you configure yourself; connecting GitHub does not start any monitoring. They support connected github.com repositories, not self-hosted GitHub Enterprise. Our event-triggered tasks guide covers that setup. (OpenAI’s GitHub app guide)
Authorize the right repositories
- Open Settings > Plugins and select GitHub, or the plugin that includes it.
- You are sent to GitHub to install and authorize the ChatGPT app.
- Choose the personal account or organization the repositories belong to.
- Select the repositories ChatGPT can access: all, or only the ones you pick.
- Return to ChatGPT. To change the list later, open Settings > Plugins > GitHub and use the repository-management option.
Installing a GitHub App grants the permissions it requested, and you specify which repositories it can reach. Under Repository access you can choose All repositories or Only select repositories. If you are new to a codebase, starting with only the repositories you need keeps answers focused. (GitHub on installed apps; OpenAI’s GitHub app guide)
Organizations add their own step. If your organization restricts app access, an owner may need to approve the ChatGPT app or a specific repository; installing the app and granting repository access are separate steps. Organization owners can change which repositories the app reaches, and repository administrators can add their repositories to an existing installation. (OpenAI’s GitHub app guide; GitHub on installed apps)
In a ChatGPT workspace, administrator settings apply too: Business administrators can enable or disable app access, and Enterprise and Edu may also offer role-based controls. If your GitHub organization uses an IP allow list, OpenAI’s egress IP ranges must be added. (OpenAI admin controls; OpenAI’s GitHub app guide)
Check one file you already know
The repository selector searches repository names, not files. To find a file, ask in a conversation and name the repository, plus the path if you know it. (OpenAI’s GitHub app guide)
Use GitHub. In the repository [owner/repo], open [README.md or path/to/file]. Tell me the exact path you read and quote its first heading or one short line word for word so I can check it. If you cannot open that repository or file, say so and tell me what you can see instead. Do not guess from other repositories or general knowledge.
Open the same file on GitHub and compare. If the repository does not appear at all, go to the troubleshooting section below before reconnecting.
Explain a code path with file evidence
ChatGPT forms search queries from your prompt and sends them to GitHub, sometimes several, to find relevant files. A narrow question with a named repository, function or error message gives it a better chance than “explain the backend.” (OpenAI’s GitHub app guide)
Use GitHub in [owner/repo]. Explain how [feature, e.g. a password reset request] flows through the code, starting from [entry point, route or function name if known]. For each step, give: - The file path and the function or class name. - A short quote of the relevant code. - What that code does, in one sentence. Do not invent line numbers; give them only if you can see them. Then list files you expected but could not find, and anything the path depends on that you did not open, such as configuration or other repositories.
Based only on the files you quoted above, sort your explanation into three lists: 1. Observed: behavior the quoted code shows directly. 2. Inferred: what you believe happens but the quoted code does not prove, and why. 3. Needs validation: what someone should run, test or ask the code owner before relying on it. Do not claim that tests pass, that the code is secure, or that you reviewed the whole repository.
A fictional example
This is an illustration, not a real result. The repository and code are invented.
| File evidence | Reasonable interpretation | Still needs validation |
|---|---|---|
| api/routes/reset.ts: handler calls createResetToken(user.id) | Reset requests create a token per user | Whether old tokens are invalidated; no code found |
| lib/tokens.ts: expiresIn: "30m" | Reset links likely expire after 30 minutes | Whether an environment setting overrides this |
| README: “Emails are sent by the notifications service” | Delivery happens in another repository | That repository was not authorized, so it was not read |
Fictional explanation: file evidence, interpretation and validation still needed
api/routes/reset.ts: handler calls createResetToken(user.id)
- Reasonable interpretation
- Reset requests create a token per user
- Still needs validation
- Whether old tokens are invalidated; no code found
lib/tokens.ts: expiresIn: "30m"
- Reasonable interpretation
- Reset links likely expire after 30 minutes
- Still needs validation
- Whether an environment setting overrides this
README: “Emails are sent by the notifications service”
- Reasonable interpretation
- Delivery happens in another repository
- Still needs validation
- That repository was not authorized, so it was not read
The last row matters most. An answer can only be as complete as the repositories you authorized; when code calls into something ChatGPT cannot see, the honest answer is a gap, not a guess.
Draft an onboarding note or change proposal in ChatGPT
Using only the Observed, Inferred and Needs validation lists above, draft [an onboarding note for a new teammate / a short change proposal for: describe the change] under 350 words. - Cite the repository and file path for each technical point. - Keep inferred points marked [inferred]. - End with an “Open questions and checks” list. Write it here in ChatGPT only, as text for me to review. Do not claim the proposed change has been tested.
Copy the note into your wiki, issue or pull-request description yourself after checking it. The GitHub app in ChatGPT cannot push code or open pull requests; if you want an agent to edit and push, that is Codex. (OpenAI’s GitHub app guide)
Your app permission still matters for reading: Always ask makes ChatGPT ask before it reads app information, while Allow read actions reads without another prompt. Changing it does not revoke access already granted. (OpenAI on app permissions)
When a repository or file is missing
| Symptom | Next check |
|---|---|
| A new repository is not listed | Wait about 5 minutes, then check again |
| A private or new repository never appears | The GitHub app’s repository settings: is it installed on the right account or organization, and is the repository selected? |
| GitHub shows connected but no repositories | Check those repository settings before reconnecting |
| An organization repository is blocked | An organization owner may need to approve the app or repository |
| GitHub works in deep research but not chat | Availability varies by plan and surface; check your plan |
| GitHub shows Disabled by admin | In a workspace, whether GitHub is enabled for your role; on a personal plan, check plan, region and surface |
Troubleshooting GitHub in ChatGPT
A new repository is not listed
- Next check
- Wait about 5 minutes, then check again
A private or new repository never appears
- Next check
- The GitHub app’s repository settings: is it installed on the right account or organization, and is the repository selected?
GitHub shows connected but no repositories
- Next check
- Check those repository settings before reconnecting
An organization repository is blocked
- Next check
- An organization owner may need to approve the app or repository
GitHub works in deep research but not chat
- Next check
- Availability varies by plan and surface; check your plan
GitHub shows Disabled by admin
- Next check
- In a workspace, whether GitHub is enabled for your role; on a personal plan, check plan, region and surface
GitHub’s own search index can take time to include a new repository; that is separate from anything in ChatGPT, which has no GitHub sync to wait for. If GitHub still is not used after these checks, stop reconnecting and note what you tried before asking your admin or OpenAI support. (OpenAI’s GitHub app guide; OpenAI app troubleshooting)
Disconnecting, revoking and data handling
Disconnecting GitHub in ChatGPT (Settings > Plugins > GitHub > Disconnect) stops future access through that account, but does not delete existing conversations, saved files or memories. GitHub has its own controls: you can suspend or uninstall the app on an account or organization, and de-authorize it under Authorized GitHub Apps to deactivate tokens issued on your behalf. (OpenAI’s GitHub app guide; OpenAI on app accounts; GitHub on installed apps)
By default, OpenAI does not use content from Business, Enterprise and Edu to improve its models; for personal accounts it depends on Improve the model for everyone. Search queries sent to GitHub are subject to GitHub’s own terms. With Memory on, ChatGPT may remember details it read from an app. (OpenAI’s GitHub app guide; OpenAI on connected apps)
For more on the connection itself, see the ChatGPT + GitHub record and our guide to ChatGPT connectors versus MCP servers. If project decisions live in Notion, the Notion setup guide uses the same evidence-first approach.
Connector Scout is independent. It is not affiliated with, endorsed by or sponsored by OpenAI or GitHub, and this guide contains no sponsored or affiliate links.
Sources
- [1] OpenAI, Connecting GitHub to ChatGPT
- [2] GitHub, Reviewing and modifying installed GitHub Apps
- [3] OpenAI, Connecting and managing app accounts in ChatGPT
- [4] OpenAI, Managing app permissions in ChatGPT
- [5] OpenAI, Connected apps in ChatGPT
- [6] OpenAI, Troubleshooting plugins and apps in ChatGPT
- [7] OpenAI, Admin controls, security, and compliance for plugins and apps
Accessed and reviewed 28 Oct 2026.