Reputation:
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
Reputation: 6476
Try this:
(I assume the name of the development branch is dev
, replace it with the actual name)
git merge --abort
git fetch origin
git checkout master
git merge origin/master
# merges latest changes from origin to the local mastergit add .
; git commit
# fix conflicts if any and commit the mergegit checkout dev
# switch to the dev (replace to actual the branch name) branchgit merge origin/dev
# merge the latest changes from the remote dev branch to the local dev branch, fix conflicts if anygit merge master
# merge master into dev, fix conflicts if anygit push origin HEAD:dev
The merge conflicts from the PR should be gone
Upvotes: 2
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