Resolve Conflicts Between Your Local Project and Org
Say you run project deploy preview and see conflicting changes between your local project and in the org. For example, this command output shows that WidgetClass has conflicting changes but GizmoClass is ready to be deployed.
If you try to actually deploy the source, Salesforce CLI reports the conflict again and stops the operation from completing. You see similar conflict messages when you run project retrieve preview. To successfully deploy or retrieve, first resolve the conflicts, and then overwrite either your local project or the org with the resolved file. Let’s see how this works.
Overwrite Conflicting Changes
If you decide that the local version is correct, overwrite the conflicting change in the org by including the --ignore-conflicts flag when you deploy. In our example, because only WidgetClass has conflicting changes, let’s first deploy just that component to get rid of the conflicts and then deploy the non-conflicting source later.
The DevSandbox org now has the same version of WidgetClass that was in your local project. When you run project deploy preview again you see no conflicting changes messages.
If, however, you decide that the version of WidgetClass in the org is the correct one, overwrite your local copy by retrieving the DevSandbox org version while ignoring conflicts.
Your local project now has the same version of WidgetClass that was in your org.
Well done, you resolved the conflict! Now run project deploy start without any special flags to finish deploying GizmoClass and any other new local source.