How to Use Gitingest to Convert a GitHub Repository into an LLM-Ready Text Digest
Updated
Gitingest turns any Git repository into a plain-text digest of its codebase that you can paste into an LLM. The fastest way to use it: take a GitHub URL and replace hub with ingest. For example, github.com/tiangolo/fastapi becomes gitingest.com/tiangolo/fastapi, which opens a page with the repository already processed. You can also paste a repository URL directly into the input on gitingest.com. This works for public repositories without any setup; private repositories need a personal access token (PAT), covered below.
What the digest contains
The output is organized into three parts, each with its own copy control:
- Summary — an overview of the repository.
- Directory Structure — the file tree, so the model can see how the project is laid out.
- Files Content — the actual contents of the included files.
You can copy each section individually or use Copy all / Download to take the whole digest at once.
Controlling what gets included
A full repository is often too large or too noisy for a prompt, so Gitingest gives you filters:
- Include — restrict the digest to specific files or directories.
- Exclude — drop files or directories you don't want.
- Include files under — a size limit (the page shows 50kB as the example value) that keeps large files out of the output.
The practical workflow is to start with the default digest, check the size, then tighten the filters until the result fits comfortably in your model's context window. Excluding lockfiles, build artifacts, and binary assets usually cuts the most bulk with the least loss of meaning.
Ingesting a private repository
Private repositories require a PAT. According to the site, the token handling is designed to be short-lived:
- The PAT is never stored in the backend.
- It is used once for cloning, then discarded from memory.
- There is no browser caching.
- Cloned repositories are deleted after processing.
You generate a token on your Git host and supply it for the ingest. Treat the token as a credential regardless: scope it to the minimum access needed (read-only repository access) and revoke it when you're done, since a token that grants repository access is sensitive even when the service promises not to retain it.
Verifying the result
Before pasting the digest into a prompt, confirm two things:
- Completeness — the Directory Structure should match the repository you expect. If key directories are missing, your include/exclude rules are too aggressive.
- Size — check the length of the Files Content section. If it's far larger than your model's context window, re-run with a tighter size limit or narrower includes.
Common snags
- The digest is truncated or the page keeps loading. Very large repositories can exceed what the filters can reasonably trim. Narrow the include list to the directories that matter for your question.
- The URL rewrite doesn't work. The
hub→ingestswap applies to GitHub URLs. If you're on a different host, paste the repository URL into the input field instead. - Private repo fails to clone. The PAT is likely missing the required scope or has expired. Generate a fresh token with read access and try again.
Once you have a digest that fits, paste it into your LLM prompt as context and ask your question about the codebase.