ChatGPT Projects and GitHub: Connecting Repository Context

To give a ChatGPT Project repository context, you supply code and files in a way that ChatGPT can read. Here is how to do it, how to verify freshness, and how to keep the decisions and lessons that repository files alone do not capture.

Updated 6 min read

Connecting a GitHub repository to a ChatGPT Project means making the code, documentation and configuration files available as context when you ask ChatGPT questions about the project. There is no single "connect repository" button; you supply the context through files, a GitHub connector, or by pasting relevant content directly.

The practical challenge is freshness: code changes constantly, and any context you supply is a snapshot of one moment. Tools like fenbs address the side of a software project that code files do not capture—the decisions, the lessons from past work, and where the current session should continue.

Ways to supply repository context to a ChatGPT Project

The most reliable option depends on how much context you need and how often the code changes. For a small or slow-moving project, uploading key files to the project's knowledge base works well. For an active codebase, you need a method that refreshes regularly.

Approaches for supplying GitHub context to a ChatGPT Project
ApproachBest forWhat to watch
Upload files to project knowledgeStable files: README, architecture docs, conventions, API contractsFiles do not update automatically; re-upload after significant changes
Paste content into instructionsShort, critical context that rarely changes: a list of conventions, a schema definitionInstructions have a length limit; keep to the most essential content
GitHub connector (where available)Active repositories where ChatGPT Work supports a GitHub connectionVerify the connector's read permissions and which files it indexes
Export selected files and uploadSpecific files from a large repo without uploading the whole thingManual process; plan how often you will refresh the uploaded versions

Before building a workflow around the GitHub connector, check ChatGPT's current documentation for which plans support it and what it can actually read. Connectors in ChatGPT Work are being updated alongside the platform's broader changes.

What to include and what to leave out

A full repository export is usually too large and too noisy. ChatGPT has a context window limit; filling it with lock files, generated code, or test fixtures crowds out the content you actually want to reference.

A practical starting set for a software project might include: the README, the architecture or design document, the API contract or schema, a list of coding conventions, and any runbooks or setup guides. Leave out generated files, dependency directories, and large binary assets.

  • README and architecture docs: high value, changes slowly, worth uploading.
  • API contracts and schemas: essential context for anyone working on the project.
  • Coding conventions and style guides: rules that should apply across every session.
  • Lock files (package-lock.json, yarn.lock, etc.): omit; they are machine-generated and add noise.
  • Generated build output: omit; it is derived from the source.
  • Source code for active features: paste the relevant file when you need it rather than uploading everything.

Checking freshness before you rely on it

Code changes faster than context documents. A schema you uploaded last week may not match the schema that was merged this morning. Before asking ChatGPT to make decisions based on a project file, confirm the version it has matches what is in the repository.

One practical approach: at the start of a session, ask ChatGPT to describe the current schema or architecture. Compare the answer to the live code. If there is a mismatch, re-upload the relevant file before continuing. This is an extra step, but it prevents the project from drifting in a direction based on outdated information.

For the project's best-practices guide, see ChatGPT projects best practices for a broader look at what makes a well-maintained project.

What repository files do not capture

Even a complete and current export of a repository does not tell an assistant why a particular decision was made, what was tried and rejected, or where the current session should pick up. Code is the result of decisions, not the record of them.

Say a team decided to switch from a REST API to a GraphQL schema after a performance review. The schema file shows the current state; it does not explain the reasoning, what the migration plan is, or what risks were identified. That context belongs in a decisions and lessons record.

How fenbs helps

Keep the decisions and lessons repository files do not hold

fenbs stores the decisions, lessons and current progress that the code itself does not record. Connect a supported assistant via MCP from Integrations, and it reads the project context—Rules, Where we left off, lessons from past work—alongside whatever repository files you supply. The code explains what was built; fenbs explains why and where to continue.

Create a free account

Free for one person · No credit card · Works with Claude, ChatGPT, Cursor and more

Lessons from previous sessions

When an assistant finds a subtle bug, runs into an unexpected dependency conflict, or discovers that a particular approach causes test failures, that lesson is worth preserving. Repository files may capture the fix but not the backstory.

A lessons record in a work tool gives future sessions the benefit of past mistakes without anyone having to remember to mention it. Something like "every time we changed the auth middleware, it broke the test fixture for the payment flow" is the kind of lesson that prevents repeated debugging sessions.

How to do this with fenbs

  1. Create a free account and add the software project to your fenbs board. List the active tasks and write the architectural decisions and conventions in Decisions and rules.
  2. Upload the stable documentation files—README, architecture doc, API contract—to the ChatGPT Project knowledge base.
  3. After any session where something significant was learned, add a lesson to fenbs: what happened, what was learned, and what to do differently.
  4. Connect ChatGPT to fenbs via MCP by following the developer-mode setup at Integrations. At the start of each session, ChatGPT reads the fenbs context alongside the project files.
  5. When a code file changes significantly, update the version in the ChatGPT Project knowledge base so the context stays current.

Questions people ask.

Does ChatGPT automatically read my GitHub repositories?

Not by default. You supply repository context by uploading files to the project's knowledge base, using a GitHub connector where available, or pasting content into the project instructions. Check ChatGPT's current documentation for which plans support a GitHub connector.

How do I keep repository context fresh in a ChatGPT Project?

Uploaded files do not update automatically. For stable documentation, re-upload after significant changes. For fast-moving code, paste the current version of a file into the conversation when you need ChatGPT to reason about it, rather than relying on a potentially outdated upload.

Can ChatGPT commit changes back to GitHub?

ChatGPT cannot push commits to GitHub from within the ChatGPT app through the standard connector. Write access to a repository typically requires a developer integration or a tool like GitHub Copilot that is built for that purpose.

What is the difference between supplying code context to ChatGPT and using GitHub Copilot?

GitHub Copilot is a coding assistant that reads your codebase directly in your editor and IDE, with deep repository integration. ChatGPT Projects work with the files you explicitly supply as context. They serve different primary use cases: Copilot for in-editor coding help, ChatGPT for broader conversation and planning about a project.

How does a ChatGPT Project with GitHub context compare to a Claude Project?

Both let you supply files and instructions as project context. The key differences are in their connector ecosystems and developer integration options. For a detailed side-by-side, see the page on Claude projects vs ChatGPT projects.

More in Connect your AI tools

All Connect your AI tools articles

Start with one thing.

Free for one person · No credit card · Works with Claude, ChatGPT, Cursor and more

There is nothing to set up first. Write one line and you’ve started.