Search in only my repositories for files with a specific name.

huangapple go评论63阅读模式
英文:

Search in only my repositories for files with a specific name

问题

我想要在我的存储库中找到所有的 readme.txt 文件。

我尝试了以下查询:

filename:readme.txt user:emirhanyagci

user 更改为 owner 没有帮助。我该如何做到这一点?

英文:

I want all readme.txt files in my repos.

I tried this query:

> filename:readme.txt user:emirhanyagci

Changing user to owner didn't help. How can I do this?

答案1

得分: 0

filename 不是一个有效的搜索限定词。您必须使用 path 代替:

> path:readme.txt user:emirhanyagci

将显示任何深度中的 readme.txt 文件,

> path:/^readme.txt/ user:emirhanyagci

(从开头锚定的正则表达式)将显示存储库根目录中的 readme.txt 文件。

英文:

filename isn't a valid search qualifier. You have to use path instead:

> path:readme.txt user:emirhanyagci

will show readme.txt files at any depth, an

> path:/^readme.txt/ user:emirhanyagci

(regular expression anchored at the start) will show readme.txt files in the root directory of repositories.

答案2

得分: -1

请用中文解释以下内容:

path:**/readme.txt user:your_username

将 "your_username" 替换为您实际的GitHub用户名。这个查询将限制搜索范围,仅在您拥有的仓库中查找名为 "readme.txt" 的文件。

注意,“user” 关键字指定了仓库的所有者。

英文:

Try the following

path:**/readme.txt user:your_username

Replace "your_username" with your actual GitHub username. This query will narrow down the search to files named "readme.txt" within repositories owned by you.

Note that the "user" keyword specifies the owner of the repositories.

huangapple
  • 本文由 发表于 2023年7月4日 23:35:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/76614124.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定