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

0 votes
Answer 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.



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 Sign up to answer
Community showcase
Published Thursday in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

228 views 0 12
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