GitHub recently announced to have rolled out a new technology preview for substantial improvements to searching code on GitHub.
“We want to give you an early look at our efforts and get your feedback as we iterate on helping you explore and discover code—all while saving you time and keeping you focused,” writes Pavel Avgustinov, product engineer at GitHub.
Once the technology preview is enabled for an account, the developer can try it out at https://cs.github.com. Initially, GitHub has created a separate interface for the new code search and the team being happy with the feedback, is ready for wider adoption and integrate to main github.com experience.
At the moment, the search index covers more than five million of the most popular public repositories; in addition, allows to search private repositories which developers have access to. Here are some highlights to look out for:
- Easily find what you’re looking for among the top results, with smart ranking and an index that is optimized for code.
- Search for an exact string, with support for substring matches and special characters, or use regular expressions (enclosed in
- Scope your searches with
repo:qualifiers, with auto-completion suggestions in the search box.
- Refine your results using filters like
extension:, and Boolean operators (
NOT). Search for definitions of a symbol with
- Get your bearings quickly with additional features, like a directory tree view, symbol information for the active scope, jump-to-definition, select-to-search, and more