Reputation: 2728
I'm searching a fairly major GitHub repo for an error that's a) a big one b) easily fixed. I know where it is from the frontend, I just need to search the entire GitHub repo for a string.
How do I do that?
Upvotes: 28
Views: 63789
Reputation: 427
You can replace the .com in the github URL to .dev to open the visual studio code editor in the browser. Then you can use the vscode search function.
E.g., https://github.com/dummy/dummy becomes https://github.dev/dummy/dummy
Upvotes: 1
Reputation: 21
If you are logged in, you can use the search bar at the top left of the page to search within a repository, within the organization, or within all of GitHub. If you are not logged in, the only search bar you will see is in the top right, which always searches all of GitHub.
Upvotes: 2
Reputation: 477
You can search an entire repo in github by using the search bar found at the top left corner of the screen.
Upvotes: 27
Reputation: 26907
From GitHub Developer Guide:
GET /search/code
Example:
https://api.github.com/search/code?q=addClass+in:file+language:js+repo:jquery/jquery
Upvotes: 4
Reputation: 310983
I'd clone the repo (which you'd need to do anyway if you want to create a PR for it) and git grep
it:
$ git grep string_to_look_for
Upvotes: 13