When I did a sfdx force:source:pull, it pulled all the default apex pages and associated classes (things like resetting a password, etc.).

Is this because I have "hasSampleData":"true" in my scratch config file?

I don't want that as part of my package. How can I pull specific changes I make on the scratch org without getting all the rest? For example, I want to add some fields to a custom object, then pull that in.


You can use .forceignore to prohibit things from syncing both directions. And yes, it's because you used hasSampleData set to true, or because you enabled specific features (e.g. creating a Site). Once you ignore the files, you can then safely delete them from your repo if they're already there.

  • Yes, I created a site. My app uses a REST endpoint that I have to manually created on the scratch org. (Don't think that can be pulled and packaged, due to the need to create a unique domain.) Mar 13 '18 at 22:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.