Skip to main content

Filtering files in a pull request

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.

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.

  1. Under your repository name, click Pull requests.

    Issues and pull requests tab selection

  2. In the list of pull requests, click the pull request you'd like to filter.

  3. On the pull request, click Files changed. Pull Request Files changed tab

  4. Use the File filter drop-down menu, and select, unselect, or click the desired filters. File filter option above pull request diff

  5. Optionally, to clear the filter selection, under the Files changed tab, click Clear. Clear file filter selection

Using the file tree

  1. Under your repository name, click Pull requests.

    Issues and pull requests tab selection

  2. In the list of pull requests, click the pull request you'd like to filter.

  3. On the pull request, click Files changed. Pull Request Files changed tab

  4. Click on a file in the file tree to view the corresponding file diff. If the file tree is hidden, click 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 filter changed files search box and file tree emphasized

  5. 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