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 ./classes/WidgetClass.cls-meta.xml
5Local Add (Conflict_ WidgetClass ApexClass ./classes/WidgetClass.cls
6Remote Changed (Conflict) Widget__c CustomObject ./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
If you have no doubts that the local or remote version is correct, you can 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 in the org. If you had different versions of these same files in your local project, they’re replaced with the versions that exist in your org.
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 your org contained different version of those same components, they’re replaced with the versions from your local DX project.