How to search for a string in a local repository on Github

Issue:

You’re trying to find some text in a local repo on Github. You’re confused because the big search bar at the top left seems to want to search across the entire Github, not just this repo.

Solution:

In the big search box type:

repo:spatie/dashboard.spatie.be text-invers

repo refers to the repo search specific command
spatie/dashboard.spatie.be is the actual name of the repo
text-invers is the text you are looking for

Reference:
https://help.github.com/articles/searching-code/#search-within-a-users-or-organizations-repositories

Tags

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top