Search GitHub for a common word and you get a pile of hits from tests, examples and docs. The path: qualifier is how I narrow it to the files I care about.
"fatal error" repo:github-linguist/linguist
timeout path:*.yml
timeout path:/src/*.js
timeout NOT path:test
A plain term after path: matches anywhere in the file path, so path:docker catches both folder and file names. Globs work: * stays within one folder level, ** crosses folders. They are not anchored by default, so add a leading slash when the match has to start at the root of the repository. NOT removes what you do not want.
For an exact file name, wrap a regular expression in slashes:
path:/(^|\/)compose\.yaml$/
That is a great way to see how other people write a certain config file.
Results do not cover every file in every repository: vendored and generated code is left out, and so are files over 350 KiB. No hit is therefore no proof that something does not exist.
Further reading: GitHub Docs: code search syntax
Going deeper: Run degoog on Unraid as your own search page, compared with SearXNG and 4get