Merging with Conflicts

Learn how Blue Canvas helps solve merge conflict between Salesforce orgs.

What are Merge Conflicts?

In Blue Canvas, a merge is the process of updating your Deployment Request with the latest changes found on the target branch.

A conflict occurs when two people have made changes to the same lines of code and those changes cannot be automatically merged together. This can happen when both people have made different changes to the same lines of code, or when one person has deleted a block of code that the other person has modified.

How can Merge Conflicts occur with Salesforce?

Conflicts can occur in a number of ways, but they generally happen when two people make changes to the same lines of code in different branches. For example, consider the following scenario:

  1. Person A creates a new branch from the main codebase and makes a change to a file.
  2. Person B also creates a new branch from the main codebase and makes a change to the same file.
  3. Person A finishes their work and attempts to merge their changes back into the main codebase.
  4. Person B also finishes their work and attempts to merge their changes back into the main codebase.

At this point, the source control system will not be able to automatically merge the changes made by Person A and Person B, because they both modified the same lines of code. This results in a conflict that needs to be manually resolved.

How to solves Salesforce Merge Conflicts

When a Salesforce Merge Conflict occurs, Blue Canvas will mark the conflicting lines of code in the file and provide a way for the developer to choose which changes to keep. The developer will need to edit the file and resolve the conflict by selecting which changes to keep and which to discard.

Once the conflict has been resolved, the developer will be able to deploy without accidentally overwriting another persons code.

1648

When conflicts are detected the Resolve Conflicts button shows