Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
GitHub Docs

Finding files on GitHub

You can search for a file in a repository using the file finder. To search for a file in multiple repositories on GitHub, use thepath code search qualifier.

Tip

  • By default, file finder results exclude some directories likebuild,log,tmp, andvendor. To search for files in these directories, use thepath code search qualifier. Alternatively, you can customize which directories are excluded by defaultusing a.gitattributes file.
  • You can also open the file finder by pressingt on your keyboard. For more information, seeKeyboard shortcuts.

Using the file finder

  1. On GitHub, navigate to the main page of the repository.
  2. In the “Go to file” search bar, type the name of the file or directory you'd like to find.
    Screenshot of the main view for a repository. A search bar, labeled "Go to file", is outlined in dark orange.
  3. Alternatively, if there is no "Go to file" search bar, clickGo to file, then type the name of the file or directory you'd like to find.
    Screenshot of the main view for a repository. A "Go to file" button is outlined in dark orange.
  4. 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.

Customizing excluded files

By default, file finder results do not include files in the following directories:

  • .git
  • .hg
  • .sass-cache
  • .svn
  • build
  • dot_git
  • log
  • tmp
  • vendor

You can override these default exclusions using a.gitattributes file.

To do this, create or update a file called.gitattributes in your repository root, setting thelinguist-generated attribute tofalse for each directory that should be included in file finder results.

For example, the following.gitattributes file would cause files in thebuild/ directory to be available to the file finder:

build/** linguist-generated=false

Note that this override requires the use of the recursive glob pattern (**). For more information, seepattern format in the Git documentation. More complex overrides of subdirectories within excluded-by-default directories are not supported.

Further reading


[8]ページ先頭

©2009-2025 Movatter.jp