This is our scenario:
We have bitbucket-piplines.yml in our development branch. All the developers have read access to it. A developer created a separate branch, edited the bitbucket-pipline.yml along with other changes and created a pull request. Now during pull request, we want to discard the changes to the bitbucket-pipeline.yml file. I assume this can be done by adding this file to repository's pull request exclude File setting.
But, when we merge the development branch into the master branch through the pull request, we want the bitbucket-pipeline.yml file to be merged with the changes if any changes have been made to that file in the development branch.