Search code examples
eclipsegitatlassian-sourcetreemerge-conflict-resolution

Multiple common ancestors were found and merging them resulted in a conflict


I am performing salesforce deployments. The current setup is:

  1. Dev org is pushed from develop1 branch.
  2. UAT org is pushed from UAT1 branch.

Every 2 weeks we do a Mergeback of UAT1 into develop1. Which is later deployed onto the dev org.

This has been working for me until now. Currently I have been continuously seeing below error while merging in eclipse:

**"Multiple common ancestors were found and merging them resulted in a 
conflict"**

I tried using Eclipse Neon/Mars with Egit 4.*. I am unable to carry out the merge activity and resolve the conflicts.

Based on the answers in the below question:

How to work around "multiple merge bases" error in EGit Eclipse plugin?

I do not want to go about the cherry picking of the merge activity since It will be a very cumbersome task.

Is there another tool which can handle this? I have installed sourcetree, but I am not sure if this would help.


Solution

  • I was able to get this working by doing the following:

    1. Used source tree to merge the local copies of the remote branches develop1 and UAT1---> Source tree was able to handle the multiple ancestor problem and gave me a list of conflicts.

    2. Since I was not very comfortable with using Source tree for conflict resolution, I eclipse to open the code and resolve the conflicts in the Git staging window.(I'd like to know if there is a similar external editor that allows you to accept the changes and reject like eclipse).

    3. Staged and committed the files using eclipse.

    This is a long workaround, and I wonder if I will see the Multiple ancestor issue when I perform the mergeback again after 2 weeks.