It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Excluding a file during pull request

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.

1 answer


The developer needs to discard their change before they commit & push & create their pull request, like so:

git checkout origin/develop -- bitbucket-piplines.yml

(That command resets "bitbucket-piplines.yml" to be identical to the version in origin/develop at that moment).

They can easily update their pull-request using that command and then pushing the result to their PR's source branch.

That's what we normally do. But sometimes developers forget to checkout the file and reviewer accept the pull request. We want to avoid it.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

710 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you