Avoid conflict for version file while using Automatic branch merging functionalities

vaibahv sharma July 18, 2022

Hi,

We want to use the "Automatic branch merging" for that we enabled the  "Enable automatic branch merging" as mentioned at the page Automatic branch merging.

Version: Atlassian Bitbucket v7.21.2

Now let's assume we have two branches release/6.1 and release/6.2  and both have version file. so each time there a PR merge in release/6.1 code should auto merge to release/6.1.

But when we have different version let's say

release/6.1   

Direct Commit 1> version file content "6.1.1"

release/6.2   

Direct Commit 1> version file content "6.2.1"

Now made few change in release/6.1 and made a PR-1 from other branch  --> release/6.1

When I am merging this PR-1 it is displaying message that it will merge to release/6.2. But when we hit the button merge instead of merging to release/6.2 it always raise conflict PR-2 from release/6.1-->release/6.2  for version file.

We tried this suggestion

Followed:

  • Login to your Bitbucket server via terminal.
  • Execute git config --global merge.ours.driver true

And added below in .gitattribute

version merge=ours

Faced the same issue.

Is there a way to avoid version file conflict as we don't want to merge version file from release/6.1 --> release/6.2?  

 

1 answer

0 votes
vaibahv sharma July 26, 2022

Could anyone reply on it?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events