Trying to merge branches are overwritting but there are a lot of changes
Asked by Juan Munoz Martinez:

Hi everyone, in our team we have the following branches working with Javascript app:

* Develop
* Alternative-develop (kind of pre develop were changes in sprint merges here before merge to develop, So alternative-develop is the same develop but updated with the latest requests)
* We have a copy of develop called (Light mode) with huge work.

We were working on light mode for a full sprint but the work is not done currently because some routes are pending to convert.

So the next sprint we've been working on a different request and the branches were made from develop.

We merged this new work to alternative-develop and this new work has some different elements of light mode, so we want to merge this new changes also to light mode.

When we tryed to merge to light mode branch from alternative-develop to light mode, whole the Light mode branch were overwrited and the Light mode changes were lost.

We have a copy in other branch of light mode (The correct Light mode) but if we try to merge the changes to Light mode, all is overwrite.

Any Suggestion? We were working and making some test with no results and we want to merge the new functions and the work made in the light mode working togueter.


Answers:
author: Theodora Boudale
body: Hi Juan and welcome to the community.

How did you perform the merge from alternative-develop to light mode? Did you use a pull request or did you merge locally?

Were there any conflicts when you tried to merge?

If there were conflicts, did you resolve them manually, or with --ours or --theirs option? Resolving merge conflicts with ours or theirs is going to discard changes of conflicted files from one branch and keep the changes from the other branch.

Kind regards,  
Theodora

comments: author: Juan Munoz Martinez
body: Hi Theodora, thanks for your reply, about your questions, we tryed both merges, from bitbucket client and locally, and were not found any changes, it just overwrited whole the branch. We were waiting a lot of conflicts to solve them before merging because that's the correct path to update a branch and that's the way we've been working all the sprints and never experienced something like that.

Thanks in advance.

Juan Mu?oz


author: Theodora Boudale
body: Hi Juan,

Thank you for the info. Without examining the source code and the changes, it's hard to say why you see that behavior.

Since your workspace is on a paid billing plan, you can create a ticket with the support team and ask them for help to investigate the behavior you are seeing.

If you haven't undone the merge on the Bitbucket Cloud repo, you can provide in the support ticket the URL of the PR that you used to merge, and also some examples of which exact files/changes were undone by the merge of the PR.

If you have undone the merge on the Bitbucket Cloud repo, you can create a fork of the repo, create a PR in the fork and merge it (so that you don't affect your main repo), and then provide in the support ticket the same details about the forked repo.

You can create a ticket via <https://support.atlassian.com/contact/#/>, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product.

If you have any questions, please feel free to let me know.

Kind regards,  
Theodora


author: Juan Munoz Martinez
body: Hi Theodora,

Thank you for the information. Next week we will be doing some tests and trying to merge from other local repo. If that tests cases won't work, i'm pretty sure that the next step will be the ticket to the technical support as you commented. If the test works or something works, I'll reply the solution in this thread. Thank you for all your help Theodora.

Best regards,

Juan Mu?oz


author: Theodora Boudale
body: Hi Juan,

That sounds good and you are very welcome. Please feel free to let me know if you need anything further.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud