Rummaging Through Repos —

After 18 months, GitHub’s big code search overhaul is generally available

The technical preview that started in December 2021 is now available to everyone.

GitHub has announced the general availability of a ground-up rework of its code search that has been in development for years.

The changes include substantial new functionality that is significantly more aware of context. The company says its new code search is "about twice as fast" as the old code search and that it "understands code, putting the most relevant results first."

That's on top of redesigned search and code view interfaces. The new search interface offers suggestions and completions and categorizes and formats the results more intelligently.

Within the code view, you can easily see references in a side panel, more or less matching what you'd be able to do in Visual Studio when it comes to looking up and navigating to references. Substring queries, regular expressions, and symbol search are also supported.

GitHub published a guide to syntax, including but not limited to the usual stuff like leveraging boolean operations in queries or performing an exact search with quotation marks. There are also more specific features, like limiting your search to a specific repository, language, path, or organization.

This overhaul was first made available as a technology preview with a waitlist in December 2021. Those who opted in and were offered the new search spent a long time using it alongside the old code search as a separate tool.

If you want to go way deeper in understanding it, you can check out the GitHub engineering blog's February 2023 post detailing exactly how it works, which technologies were used to build it, and so on.

The changes are meant to improve productivity for software developers—for example, the new search could be much more efficient for finding specific vulnerabilities in a large codebase.

As noted, the change has been in the works for a while, but GitHub is positioning it as part of a larger initiative to bring more intelligence to the platform. The other most notable bullet point in that initiative is the enrichening and expansion of the AI coding tool Copilot leveraging generative AI.

Listing image by GitHub

Channel Ars Technica