sfdx – is it possible to pull or push one file instead of all the files

In Salesforce DX, I read through the document but it seems to me I can only use sfdx:force:source:push or pull to push or pull all the files. Or use .forceignore to ignore some files.

However, is that possible for me to just sync one file and ignore all the others?

Answer

Looks like this should be an idea under idea exchange for the salesforce DX Product team. Currently don’t think you can push one file and there are no commands supporting this. Salesforce DX is just not designed that way at this point although sounds like having a local staging like git to add and commit makes sense.

Update

You can now use sfdx force:source:deploy command to push one file. However, the key thing to note here these commands won’t have source tracking built into them.

Attribution
Source : Link , Question Author : Lance Shi , Answer Author : Mohith Shrivastava

Leave a Comment