{"meta":{"title":"Finding files on GitHub","intro":"You can search for a file in a repository using the file finder. To search for a file in multiple repositories on GitHub, use the path code search qualifier.","product":"Search on GitHub","breadcrumbs":[{"href":"/en/enterprise-cloud@latest/search-github","title":"Search on GitHub"},{"href":"/en/enterprise-cloud@latest/search-github/searching-on-github","title":"Searching on GitHub"},{"href":"/en/enterprise-cloud@latest/search-github/searching-on-github/finding-files-on-github","title":"Finding files on GitHub"}],"documentType":"article"},"body":"# Finding files on GitHub\n\nYou can search for a file in a repository using the file finder. To search for a file in multiple repositories on GitHub, use the path code search qualifier.\n\n> \\[!TIP]\n>\n> * By default, file finder results exclude some directories like `build`, `log`, `tmp`, and `vendor`. To search for files in these directories, use the [`path` code search qualifier](/en/enterprise-cloud@latest/search-github/github-code-search/understanding-github-code-search-syntax#path-qualifier). Alternatively, you can customize which directories are excluded by default [using a `.gitattributes` file](#customizing-excluded-files).\n> * You can also open the file finder by pressing `t` on your keyboard. For more information, see [Keyboard shortcuts](/en/enterprise-cloud@latest/get-started/accessibility/keyboard-shortcuts).\n\n## Using the file finder\n\n1. On GitHub, navigate to the main page of the repository.\n2. In the “Go to file” search bar, type the name of the file or directory you'd like to find.\n   ![Screenshot of the main view for a repository. A search bar, labeled \"Go to file\", is outlined in dark orange.](/assets/images/help/repository/repository-main-page-go-to-file.png)\n3. Alternatively, if there is no \"Go to file\" search bar, click **Go to file**, then type the name of the file or directory you'd like to find.\n   ![Screenshot of the main view for a repository. A \"Go to file\" button is outlined in dark orange.](/assets/images/help/repository/repository-main-page-go-to-file-no-search-bar.png)\n4. In the list of results, click the file or directory you wanted to find. You can view the file path for a directory or file below each search result.\n\n## Customizing excluded files\n\nBy default, file finder results do not include files in the following directories:\n\n* `.git`\n* `.hg`\n* `.sass-cache`\n* `.svn`\n* `build`\n* `dot_git`\n* `log`\n* `tmp`\n* `vendor`\n\nYou can override these default exclusions using a `.gitattributes` file.\n\nTo do this, create or update a file called `.gitattributes` in your repository root, setting the [`linguist-generated`](https://github.com/github-linguist/linguist/blob/main/docs/overrides.md) attribute to `false` for each directory that should be included in file finder results.\n\nFor example, the following `.gitattributes` file would cause files in the `build/` directory to be available to the file finder:\n\n```text\nbuild/** linguist-generated=false\n```\n\nNote that this override requires the use of the recursive glob pattern (`**`). For more information, see [pattern format](https://git-scm.com/docs/gitignore#_pattern_format) in the Git documentation. More complex overrides of subdirectories within excluded-by-default directories are not supported.\n\n## Further reading\n\n* [About searching on GitHub](/en/enterprise-cloud@latest/search-github/getting-started-with-searching-on-github/about-searching-on-github)\n* [Customizing how changed files appear on GitHub](/en/enterprise-cloud@latest/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github)\n* [`.gitattributes`](https://git-scm.com/docs/gitattributes) in the Git documentation"}