user10908204
user10908204

Reputation:

Can't resolve BitBucket git conflict

I'm trying to merge development into master, but I'm getting merge conflicts.

Merge pull request
 Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

git checkout master
git merge --no-ff -m 'Merged in development (pull request #85)' remotes/origin/development

Bitbucket tells me I should checkout master locally, and resolve the conflicts. But if I do that there are no merge conflicts to fix. Furthermore it tells me Master is up to date.

How do I solve this?

Upvotes: 0

Views: 6589

Answers (2)

neshkeev
neshkeev

Reputation: 6476

Try this:

(I assume the name of the development branch is dev, replace it with the actual name)

  1. git merge --abort
  2. git fetch origin
  3. git checkout master
  4. git merge origin/master # merges latest changes from origin to the local master
  5. Fix conflicts if any then git add . ; git commit # fix conflicts if any and commit the merge
  6. git checkout dev # switch to the dev (replace to actual the branch name) branch
  7. git merge origin/dev # merge the latest changes from the remote dev branch to the local dev branch, fix conflicts if any
  8. git merge master # merge master into dev, fix conflicts if any
  9. git push origin HEAD:dev

The merge conflicts from the PR should be gone

Upvotes: 2

rana rouzbahani
rana rouzbahani

Reputation: 41

You can merge master into dev locally, then fix conflicts. And after that push dev branch. If you do these, you won't face conflict on BitBocket

Upvotes: 3

Related Questions