I'm currently using a scratch org for development purposes.

Firstly, I'm trying to deploy using the following command[1]:

sfdx force:source:push

But, it shows conflicts occurred. So, I have to use the following command[2] for the deployment:

sfdx force:source:push -f

Okay, it's fine. But, the problem is, that local source tracking files aren't updated, and every time I deploy using the command[2], the error is shown as: "Cannot read property 'split' of undefined". My codes are deployed successfully, but this error is shown, and local source tracking isn't updated. So, my codes are deployed, but why I'm concerned?

The reason I'm concerned:

  • The codes are deployed, okay!
  • But, since the local source tracking isn't updated, that means sfdx will push all the metadata files every time you run the command[2]. Sometimes command[1] works but still deploys all the files.
  • Imagine you have thousands of metadata files; all are deployed every time you make a change to a single file.
  • It takes a significant amount of development time.
  • It indicates, sfdx doesn't know which file is only changed and needs to be pushed. So, it pushes all the files every time.
  • It's time-consuming and frustrating to push all files instead of only the changed files.

So, how to fix this issue? I know we can deploy specific files. Still, it's not convenient for me. I want sfdx to take a decision on which files to deploy itself. Otherwise, I will have to keep changing the command to specific file paths.

1 Answer 1


Okay, I've been through this issue for weeks and finally found a fix! Follow along:


  1. Delete .sfdx and .sf folders from your VSCode project directory. enter image description here

  2. Restart your VSCode (close and relaunch).

  3. Set your default org.

enter image description here

  1. Now, deploy all of your codes using the following command(This will update the source tracking):

    sfdx force:source:push -f

  2. Next time, you can use the command below. From now on, only the changed file(s) will be deployed, not all of them ;) :

    sfdx force:source:push

Another Fix(Assuming Quick fix didn't work for you):

  1. Uninstall sfdx cli.
  2. Install the latest sfdx cli.
  3. Run the following command in the terminal: sfdx update
  4. Lastly, do the steps of the 'Quickfix' section. Voila!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .