Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bitbucket merge conflict issue

I have worked on bitbucket and Github before and have good knowledge about how things work. I have one master branch and two feature branches that were created from master only. I did these steps there

  1. I merged feature1 into the master branch
    1. created a pull request for feature2 and master
      1. got a conflict in the pull request
      2. check out local master from the remote master branch
      3. check out local feature2 branch and then merged with master branch 6 push the conflict changes properly on remote feature 2 branch
      4. now on bitbucket, I tried to merge the pull request of feature 2 and master branch

but getting this error The merge could not be completed automatically. Please clone 'Project/project', checkout 'master' and merge 'feature2' (or commit 'da08d661b57e74488515184d') manually, resolving any conflicts, and push the result

Any idea how to resolve this ?

like image 939
Vipul Jain Avatar asked Nov 26 '19 17:11

Vipul Jain


1 Answers

I too faced same problem today. We have Atlassian Bitbucket server. I got the error when I was trying to merge using "Rebase, fast-forward". Then I tried another strategy, "Merge commit" and that worked for me. Refer https://confluence.atlassian.com/bitbucketserver/pull-request-merge-strategies-844499235.html. Note: On first attemp, I got a popup message asking me reload page which I did and tried again; this time it merged.

Before trying above, I tried "Workaround#1, Point 2" mentioned here at https://confluence.atlassian.com/bitbucketserverkb/pull-request-cannot-be-merged-or-not-showing-latest-commits-877338546.html but that did not help me. You may try and see what works for you.

Cause: I feel the reason why it happened to me was; I worked on a branch say B1 which I had created from Master. Then I created another branch say B2, from B1. So technically B2 had changes of B1 too hence I created PR to merge B2 to Master(yes all conflicts were resolved before creating the PR).

like image 118
Aum Avatar answered Oct 23 '22 21:10

Aum