Skip to content

Latest commit

 

History

History
53 lines (40 loc) · 3.16 KB

File metadata and controls

53 lines (40 loc) · 3.16 KB
title Filtering files in a pull request
intro To help you quickly review changes in a large pull request, you can filter changed files or use the file tree to navigate between files.
redirect_from
/github/collaborating-with-issues-and-pull-requests/reviewing-changes-in-pull-requests/filtering-files-in-a-pull-request
/articles/filtering-files-in-a-pull-request-by-file-type
/articles/filtering-files-in-a-pull-request
/github/collaborating-with-issues-and-pull-requests/filtering-files-in-a-pull-request
/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/filtering-files-in-a-pull-request
versions
fpt ghes ghec
*
*
*
shortTitle Filter files
category
Review pull requests

You can filter files in a pull request by file extension type, such as .html or .js, lack of an extension, code ownership, or dotfiles. You can also use the file tree to filter by file path, navigate between files, or see a high level view of the changed files.

Using the file filter dropdown

Tip

To simplify your pull request diff view, you can also temporarily hide deleted files or files you have already viewed in the pull request diff from the file filter drop-down menu.

{% data reusables.repositories.sidebar-pr %}

  1. In the list of pull requests, click the pull request you'd like to filter. {% data reusables.repositories.changed-files %}

  2. Use the File filter dropdown menu, and select, deselect, or click the desired filters.

    Screenshot of the view options for a pull request. The file filter option is outlined in dark orange.

  3. Optionally, to clear the filter selection, under the Files changed tab, click Clear filters.

    Screenshot of the view options for a pull request. The "Clear filters" option is outlined in dark orange.

Using the file tree

{% data reusables.repositories.sidebar-pr %}

  1. In the list of pull requests, click the pull request you'd like to filter. {% data reusables.repositories.changed-files %}

  2. Click on a file in the file tree to view the corresponding file diff. If the file tree is hidden, click {% octicon "sidebar-collapse" aria-label="The sidebar collapse icon" %} to display the file tree.

    [!NOTE] The file tree will not display if your screen width is too narrow or if the pull request only includes one file.

    Screenshot of the "Files changed" tab of a pull request. In the left sidebar, the file tree is outlined in dark orange.

  3. To filter by file path, enter part or all of the file path in the Filter changed files search box. Alternatively, use the file filter dropdown. For more information, see Using the file filter dropdown.

Further reading