Is it possible to search for a particular filename on GitHub?

后端 未结 8 836
遇见更好的自我
遇见更好的自我 2021-01-30 01:27

I know that the GitHub web interface lets you search all repositories for files with a particular pathname (e.g. searching for path:/app/models/user.rb yields >

相关标签:
8条回答
  • 2021-01-30 01:51

    Does the search user.rb in:path do what you want to do? Alternatively there is also this search filename:user.rb

    Found on: https://help.github.com/articles/searching-code/

    0 讨论(0)
  • 2021-01-30 02:02

    In my case, I wanted to search for a particular file name, in all of my organization's repositories. This can be done by entering this in the search box:

    org:your-organization-user-name filename:the-file-name

    Of course, just do "filename:the-file-name" if you want to search the whole of GitHub.

    I didn't see this in https://help.github.com/articles/searching-code/ but found out when I switched context, and GitHub entered the filter for me automaticallly.

    0 讨论(0)
提交回复
热议问题