Ignoring files

You might want to untrack certain files and folders when pushing code from the local system to the scratch Org. To do this, you have to create a file named forceignore. The sample format for forceignore is as follows:

# Specify a relative path to a directory from the project root
helloWorld/main/default/classes

# Specify a wildcard directory - any directory named “classes” is excluded
**classes

# Specify file extensions
**.cls
**.pdf

# Specify a specific file
helloWorld/main/default/HelloWorld.cls

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.