Interlinked.

Comparisons · measured July 2026 · 8 min read

Sourcegraph vs GitHub code search. Two clouds that can't see the file you just saved.

Sourcegraph and GitHub code search are two of the best code searches ever built. Point either at your repositories and it will find a symbol across millions of lines in a heartbeat. They are also built the same way: the index lives on a server, and it sees the code you have pushed. Which means neither one has seen the file you changed thirty seconds ago, the .env you git-ignored, or the repo still sitting only on your laptop.

That gap matters more now that GitHub Copilot leans on the same index: its sense of your whole codebase is only as fresh and as complete as what you have pushed. This is an honest comparison of the two, and then the third option neither is: a local index that sees the whole machine, measured, on 4.47 million real files.

TL;DR · the 60-second version

  • 01

    Sourcegraph and GitHub code search are two of the best code searches ever built, and both do the same thing: they index a copy of your code on a server and answer queries across it.

  • 02

    Both see the same slice: the pushed default branch. Neither has seen the file you saved thirty seconds ago, your git-ignored files, or the repos you never pushed anywhere.

  • 03

    GitHub Copilot leans on that same index: its whole-codebase awareness is only as complete as what you have pushed to GitHub.

  • 04

    A local whole-machine index is the third option: it indexes every file on the disk (uncommitted, git-ignored, non-git) fresh about a millisecond after a save, offline, and for every agent at once.

  • 05

    Interlinked Files is that local index: 85 microseconds to find a file across 4.47M, a content query indexed in 16 ms, about 44 MB idle, one install wiring up 19 AI clients.

The two you already know

Both are excellent. Neither is the enemy.

This is not a teardown. Each is the right tool for the job it was built for. Here is the crisp version of what each one is, so the comparison that follows is fair.

SOURCEGRAPH
server-side code search + intelligence

Sourcegraph is a code-search and code-intelligence platform: point it at your organisation's repositories (across GitHub, GitLab, Bitbucket, wherever they live) and it builds a cross-repo index on a server, cloud or self-hosted, with go-to-definition, find-references, and search that spans every repo at once. It indexes the committed, pushed state.

BEST FOR · Org-wide, cross-host code intelligence
GITHUB CODE SEARCH
search built into GitHub · Copilot's context

GitHub code search is the search engine built into GitHub: a purpose-built engine GitHub wrote about publicly, in Rust, that indexes the code hosted on GitHub for fast substring, regex, and symbol search. It is also the repository context GitHub Copilot draws on when a question is about the whole codebase rather than the file open in front of you.

BEST FOR · Searching GitHub-hosted code + Copilot

One thing both share by design: they see what has been pushed to the server, not the working copy on your disk this second, and never the files that were never in git to begin with. That single fact sets the whole comparison below.

The whole comparison in one picture

Two clouds, one machine.

Draw it honestly and the two products land in the same place: server-side indexes above the machine, each reaching only the code that has been pushed up to it. Your disk holds far more than that pushed slice: the edit you have not committed, the git-ignored config, the download, the repo that never left the laptop. A local index sits inside the machine and covers every layer of it at once.

WHERE THE INDEX LIVES, AND WHAT IT CAN REACHSOURCEGRAPHserver code-search indexcloud or self-hostedGITHUB CODE SEARCHindexes code pushed to GitHubthe index Copilot leans on▲ THE EDGE OF YOUR MACHINE: ONLY PUSHED CODE CROSSES ITYOUR MACHINE· everything on the disk, right nowPUSHED REPOSdefault branch, all a server index can seepushed ↑UNCOMMITTED CHANGESthe file you saved 30 seconds agonot pushedGIT-IGNORED FILES.env, secrets, local build outputnot pushedTHE NON-GIT 90%PDFs, configs, downloads, that one docnot pushedWHOLE-MACHINE INDEXINTERLINKEDindexes every layerTwo clouds index the pushed slice. The local index indexes the whole disk, live, and nothing leaves.

It is the same shape whichever server-side search you use: the difference is only where the index sits relative to the edge of your machine. That server-versus-local trade-off, with the freshness and privacy math, is drawn out in Sourcegraph vs local search.

Row by row

The same question, asked three ways.

This is not “who is faster”: a server code search and a local index answer for different scopes. It is a map of what each one can actually reach: where it lives, which state it sees, and whether the files you did not push exist to it at all.

The questionSourcegraphGitHub code searchLocal · Interlinked
What it indexesyour configured repos, across code hostscode hosted on GitHubevery file on the machine, names + contents
Where the index livesa server: their cloud, or one you hostGitHub's serverson your disk, beside the files
State it can seethe pushed default branchthe pushed default branchthe live working copy, this second
Uncommitted changesnot until you pushnot until you pushsearchable ~1 ms after you save
Git-ignored + non-code filesno, not in the repo indexno, not on GitHubyes: .env, PDFs, configs, downloads
Repos never pushed anywhereinvisibleinvisibleindexed like any other folder
Privacycode is indexed on a servercode lives on GitHubnothing leaves the machine, offline
Who can query ityour org, via its own surfacesyou + Copilot, via GitHubevery agent on the machine, 19 clients
Best fororg-wide cross-repo code intelligencesearching GitHub-hosted code + Copilotthe machine in front of you, and its agents

Sourcegraph and GitHub behaviour is their documented, public design: server-side indexes of the pushed state. The Interlinked figures are measured on a Ryzen 9 9950X3D · 64 GB DDR5 · NVMe · Windows 11 · 4,470,000 files: a single filename lands in 85 µs (best case 2 µs), the 20-query median across the whole drive is 139 µs, and a content query that took ripgrep 93.8 s on this corpus returned in 16 ms. Full methodology in the 412,000× VS Code write-up and the ripgrep comparison.

The shared blind spot

A server search sees what you pushed. Your agent works on what you didn't.

Both index the pushed default branch, so both are only ever as fresh as your last push. The moment you are mid-change, the answer drifts stale: the file you saved thirty seconds ago is not in either cloud until you commit and push it. And an enormous part of a working machine was never on a code host at all: the git-ignored files (.env, build output, local secrets), and the non-git 90%: PDFs, configs, exports, the download with the answer. To Sourcegraph and GitHub, none of it exists. See searching git-ignored files.

That is exactly the gap an agent falls into. It does not live in one pushed repo: it needs the working copy this second, across every repo and the files around them. So it falls back to walking the disk on every query, because nothing warmer exists machine-wide. A pre-indexed engine that stays warm in the background closes the gap: a file you just saved is searchable in about a millisecond, under 30 in the worst case, and one install hands the same index to 19 AI clients through one MCP server.

The third option

Keep both clouds. Add the machine in front of you.

Interlinked Files keeps an always-fresh index of every file on the machine (names and contents) across every repo and the non-git 90%, and hands it to whatever agent you use through one connector. It never leaves the machine, and there is no model anywhere in the box: every result is an index lookup, not a guess. Here is what that costs and delivers, measured on the same drive.

85 µs
to find a single file: a 139 µs median across all 4.47M files
93.8 s → 16 ms
a content query ripgrep walked for 93.8 s, indexed: 58,625× on the set
~1 ms
from saving a file to it being searchable: under 30 ms worst case
~44 MB
at rest in Task Manager · the index on disk stays under 1% of the drive
19
AI clients auto-configured in one install: every agent, one connector
26,958
relationship pairs seeded on install from 12/12 repos, 8,455 git events replayed in 1.7 s

For scale: finding one filename took Windows Search 67 seconds median on this machine (long enough to refill your coffee) against 139 microseconds here, about 480,000× faster. And the vault seeds a fact no server-side index can represent: on install it found two local repos sharing 435 identical files, unprompted, just counts and hashes a human can check. Methodology: Ryzen 9 9950X3D · 64 GB DDR5 · NVMe · Windows 11 · 4.47M files. The umbrella argument lives in the backbone of the LLM economy.

SOURCEGRAPH AND GITHUB FOR THE CODE YOU PUSHED. INTERLINKED FOR EVERYTHING ON THE MACHINE: LIVE, PRIVATE, FOR EVERY AGENT.

Questions people ask

The honest FAQ.

Is Sourcegraph better than GitHub code search?

Neither is simply “better”: they cover slightly different scopes. Sourcegraph is a cross-repo code-search and code-intelligence platform that indexes repositories from any code host, cloud or self-hosted, with go-to-definition and find-references across them. GitHub code search indexes the code hosted on GitHub and is the context Copilot draws on. Both are server-side, and both index the pushed default branch, so both share the same blind spot for anything you have not pushed.

Can GitHub code search or Copilot see my uncommitted or git-ignored files?

No. Both index the pushed default branch on GitHub's servers. The working copy you have not pushed, your git-ignored files (.env, secrets, local build output) and any repo you never pushed are invisible to them. A local index reaches all of it; see how to search git-ignored files.

What is GitHub's Blackbird / the engine behind code search?

GitHub code search is powered by a purpose-built search engine GitHub wrote from scratch and described publicly on its engineering blog: written in Rust, it indexes the tens of millions of repositories hosted on GitHub for fast substring, regular-expression, and symbol search. It is genuinely fast at what it does: search the code that lives on GitHub. It is not a search of the files on your own disk.

Do I have to choose between a cloud code search and a local index?

No: they answer for different places. Keep Sourcegraph or GitHub code search for the pushed, org-wide code they are built for, and add a local whole-machine index for the disk in front of you: the uncommitted, the git-ignored, the non-git 90%, offline, and for your agents. The server-versus-local trade-off is drawn out in Sourcegraph vs local search.

Does the local index send my code anywhere, and what does it cost?

Nothing leaves. There is no model, no embeddings, no cloud round-trip: a query is a lookup against an index on your own disk. The engine sits around 44 MB at rest and its index stays under 1% of the drive. Everything local is free forever, on all your devices, no card. Hosting starts at $5.99/mo.

Do this today

Index the machine a cloud can't reach.

1

Install once. One signed installer indexes every file on your machine (names and contents, every repo plus the non-git 90%) and wires up 19 AI clients: Claude Code, Cursor, Copilot, Codex, Windsurf, Zed, Cline and the rest. No cloud account, no keys, no JSON editing.

2

Let it index. Filename search works immediately; content search fills in behind it. At rest the whole engine sits around 44 MB (less than a browser tab) and stays about a millisecond behind your saves.

3

Ask normally. Your agent picks the right tool by itself. Ask where something is, or what mentions it; the answer comes back in microseconds, whole-machine, including the uncommitted and git-ignored files no server index can see.

4

Keep your cloud search. Sourcegraph and GitHub keep doing their job for the pushed, org-wide code. Interlinked runs alongside them for the live, private disk in front of you.

Everything local is free forever, on all your devices, no card. Hosting starts at $5.99/mo. Download for Windows · Server vs local search · Why finding files is the bottleneck

Measured July 2026 · Ryzen 9 9950X3D · 4.47M files · Windows 11← All research