Exclude files from the new pull request experience

A large pull request can be difficult to navigate: it degrades browser performance and can distract reviewers from the important details.

To improve your code review experience in Bitbucket Cloud, repository administrators now have the ability to exclude files from pull requests using pattern matching.

By excluding certain files from the pull request, repository administrators can make the review process cleaner and more efficient.

Excluded files only work with the new pull request experience. Make sure that feature is enabled in Bitbucket Labs for each reviewer who wants to review smaller pull requests.

Large pull requests frequently contain noise in the form of package manager lock files, minified Javascript or CSS, or other computer-generated text files. While it's important for developers to commit the files to the repository and to see when any changes are made, reviewers oftentimes don't need to review all the specific details.

For example, the screens above show how a one-line change to package.json results in a diff of 1,690 lines in yarn.lock.

Excluded files gives administrators full control over which files appear in pull requests. The filenames for all the files still remain in the pull request, but the diff for each excluded file is replaced with an informational card including a link to the file's diff.

excluded files

To exclude files in pull requests for a repo, add patterns to the list at Settings > Excluded files in the Pull Requests section.

Improve your team's code review experience in Bitbucket Cloud with excluded files today!

Have any questions? Discuss the excluded files feature with the Bitbucket Community and the engineering team here.