Newer Version Available
Resolve Conflicts Between Your Local Project and Org
Say you run force:source:status and see conflicting changes in your local project and in the org.
1=== Source Status
2STATE FULL NAME TYPE PROJECT PATH
3───────────── ───────── ───────── ──────────────────────────────────────────────────────────────────
4Local Add (Conflict) WidgetClass ApexClass /WidgetClass.cls-meta.xml
5Local Add (Conflict_ WidgetClass ApexClass /WidgetClass.cls
6Remote Changed (Conflict) Widget__c CustomObject force-app/main/default/objects/Widget__c/Widget__c.object-meta.xmlIf you pull or push source, then the CLI reports these conflicts again and stops the operation from completing. To pull or push, resolve the conflicts, and then overwrite your local project or the org with the resolved file.
Overwrite Conflicting Changes
Overwrite conflicting changes by including the -f | --forceoverwrite parameter when pulling or pushing changes.
To overwrite your local project changes with source from the org, include the -f | --forceoverwrite parameter when pulling changes.
1sfdx force:source:pull -u DevSandbox -fAfter pulling source, your local project has the same version of WidgetClass and Widget__c that existed on Salesforce. If you had changes in your local project, they are lost.
To overwrite the org with source from your local project, include the -f | --forceoverwrite parameter when pushing changes.
1sfdx force:source:push -u DevSandbox -fAfter pushing source, your org has the same version of WidgetClass and Widget__c that exists on your local project. If there were changes in your org, unless those changes exist in another developer’s local project, they’re lost.