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

This widget could not be displayed.

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 Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,320 views 8 11
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