| 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 |
|
||||||
| versions |
|
||||||
| shortTitle | Filter files | ||||||
| category |
|
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.
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 %}
-
In the list of pull requests, click the pull request you'd like to filter. {% data reusables.repositories.changed-files %}
-
Use the File filter dropdown menu, and select, deselect, or click the desired filters.
-
Optionally, to clear the filter selection, under the Files changed tab, click Clear filters.
{% data reusables.repositories.sidebar-pr %}
-
In the list of pull requests, click the pull request you'd like to filter. {% data reusables.repositories.changed-files %}
-
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.
-
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.


