Copado Auto Resolve Is Overriding Classes

When there is a conflict while merging classes and Copado auto resolves it, there is no merge in the target file. The file in the source will override the file in the target, that is, file A wins over file B. For more information, check out the article Conflict Resolution with Git Integration.

With Copado v11, Copado Online Conflict Resolution allows you to manually resolve file conflicts during the user story promotion process. If you are not using this feature, you might run into the scenario below:


User1 introduced changes to the Apex trigger 'AccountTrigger'.


User2 introduced a different set of changes to the same Apex trigger 'AccountTrigger'.


  1. User1 deployed user story from Dev1.
  2. Changes from Dev1 are included.
  3. User2 deployed user story from Dev2.
  4. Changes from Dev1 were overridden and are not available, changes from Dev2 are included.
There are multiple touch points where the developer and the release manager are notified of merge conflicts:
  1. The User Story Metadata related list will show that the AccountTrigger is also being referenced in another user story and will set the status to Potential Conflict.
  2. The Pull request for the user story sitting in Dev2 will confirm that Git is unable to merge the feature branch into the UAT branch.
  3. The Promotion record, when promoting from Dev2 to UAT, will display a related list of metadata and its merge status.
  4. Copado sends an email to the Salesforce running user email address when there are merge conflicts during a promotion. The email body indicates the files, the branches and the commit Ids that are being impacted.
  5. Copado generates a merge commit in the repository, with the text “All conflicts resolved by Copado" which includes a list of all the affected files.  Nothing gets lost, both versions of the files can be reviewed in Git.

What could have been done to prevent this from a developer process perspective?

  1. If your user story has potential conflicts in the User Story Metadata related list, make sure you create a pull request to check the merge status of the branches, using the Open Pull Request button available in the user story.
  2. Once it is confirmed that Git cannot merge the branches, incorporate the changes from UAT into Dev2 by doing a back promotion of the clashing user story. The developer will update the AccountTrigger so that it contains everybody's modifications and will commit again. This will update the feature branch with all the modifications.
  3. Update the status of the User Story Metadata for the AccountTrigger to Conflict Resolved.

What could have been done to prevent this from a release manager process perspective?

  1. Before promoting
    • Check if your promotion has user story metadata marked as Potential Conflict, then check with the developers before promoting.
  2. After promoting
    1. Check the resulting promotion branch in Git
    2. Check in the Promotion User Story Metadata related list if any item is marked as auto-resolved.
    3. Check your email if there are any notifications from Copado.

How did we do?