Peter Carter
Peter Carter

Reputation: 2728

How to: find string in GitHub repo?

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

Answers (5)

jaakdentrekhaak
jaakdentrekhaak

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

xphileprof
xphileprof

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

nikki ricks
nikki ricks

Reputation: 477

You can search an entire repo in github by using the search bar found at the top left corner of the screen.

enter image description here

Upvotes: 27

Mureinik
Mureinik

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

Related Questions