In scratch and Dev I have different Admin.profile field values and that is kind a catch 22. For some reason I have changed the Admin.profile in the scratch and now it is retrieved each time I do sf project retrieve start. But once I try to deploy to my Dev Hub I get errors becasue my Dev Hub is on an older version and doesn't have some of the fields.

How to get out of similar cases in future?

1 Answer 1


You do this using the .forceignore file. This is similar to .gitignore in that it lists files and file path patterns (using wildcards) that should not be synced between your file system and the org via the sf CLI.

An example is to exclude the profile using:

**/System Administrator.profile-meta.xml

See the documentation for more detail.

You must log in to answer this question.

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