Highlight merge in pull request

If we have a longer lasting feature branch, we should do regular merges from the develop onto the feature branch. Doing so all changes from develop are on the feature branch.

If using pull requests the commits for the merge operation are marked differently within Stash. However, within the diff view it is not possible to distinguish a change from a merge or a direct commit on the feature branch. To figure out the changes for the feature in fast manner, it would be very helpful if the changes introduced by the merge are marked differently.

1 answer

1 accepted

Hi Ivo,

I'm a little confused. If you've created a PR from feature -> develop, then merging changes back into feature should never show up in the diff because they already exist _in_ the target branch, so there's nothing to show.

Are you getting merge conflicts perhaps and the file is now slightly different? Or is the PR actually to a different branch other than develop. Either way I'm afraid there's very little we can do. That diff is showing the changes between the source and target branches, we can't distinguish where they came from. (try running 'git diff source_branch target_branch' to see what I mean).

I'm hoping the problem might be related to your target branch. If you're creating a PR to a different branch other than develop, then my advice is to merge from develop to _that_ branch, and then from the target branch into feature. This will fix your diff from showing all the changes.

Cheers,

Charles

You're right. The comparison is done against the merging Branch. Merges from the develop into the feature branch are not highlighted as changed within the pull request diff view. Thus everything is fine.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

675 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot