Searching code in a repository
Run a bounded text search across files at a branch tip.
1. Open Search
On a repository, click the Search tab to open
/{owner}/{repo}/search.2. Enter a query
Type your terms in Search query. Choose code, issues, pull requests, or all three. Path contains limits code search to matching paths. Pick a Branch, then click Search.
3. Review matches
Results list file paths, line numbers, and snippets. Click a match to open that file at the commit that was searched, on the matching line (
?at=plus#L{line}).4. Understand limits
Very large or binary files may be skipped. Truncated result sets are noted at the top of the results. A path that contains the query is returned even when the file body does not.
