Skip to main content

GitHub에서 파일 찾기

파일 파인더를 사용하여 리포지토리에서 파일을 검색할 수도 있습니다. GitHub의 여러 리포지토리에서 파일을 검색하려면 filename코드 검색 한정자를 사용합니다.

Tips:

  • By default, file finder results exclude some directories like build, log, tmp, and vendor. To search for files in these directories, use the filename code search qualifier. Alternatively, you can customize which directories are excluded by default using a .gitattributes file.
  • You can also open the file finder by pressing t on your keyboard. For more information, see "Keyboard shortcuts."

Using the file finder

  1. On GitHub.com, navigate to the main page of the repository.
  2. Above the list of files, click Go to file. Find file button
  3. In the search field, type the name of the file you'd like to find. Find file search field
  4. In the list of results, click the file you wanted to find.

Customizing excluded files

By default, file finder results do not include files in the following directories if they exist at your repository root:

  • .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 the linguist-generated attribute to false for each directory that should be included in file finder results.

For example, the following .gitattributes file would cause files in the build/ 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, see "pattern format" in the Git documentation. More complex overrides of subdirectories within excluded-by-default directories are not supported.

Further reading