Pull Declarative Changes From Your Scratch Org
In this exercise, you will…
- Run
force:source:pull
using the integrated terminal in VS Code - If
force:source:pull
gives an error, use this workaround - Examine the results of a successful
force:source:pull
Run force:source:pull
using the integrated terminal in VS Code
Now that you’ve done development work in your scratch org, it’s time to pull those changes back into your local Salesforce DX project. That’s what force:source:pull
is for.
Execute this command:
sfdx force:source:pull
Salesforce DX Command / Flags | Description |
---|---|
force:source:pull |
Pulls changed source from the scratch org to your project to keep them in sync. |
After executing the above, your terminal should look something like this:
Important: If you get an error running force:source:pull
it’s likely due to a bug in Winter’19 scratch orgs. Please see the next set of instructions for a workaround.

If force:source:pull
gives an error, use this workaround
The Winter ‘19 release has seen a lot of odd (and painful) bugs. If you got an error when you executed force:source:pull
, this workaround should be able to help get you running again.
- If you see this error, you will need to add a line to your project’s
.forceignore
. - Click on the
.forceignore
file in the VS Code Explorer. - Add
AppSwitcher.appMenu
to the.forceignore
file, directly below the entry forpackage.xml
.

Examine the results of a successful force:source:pull
If your force:source:pull
command was successful, you’ll have a number of new files in your project. Here’s a tour of what came down from your scratch org.
- The custom Lightning App that you created.
- The flexipage that is used for the Travel Expense record home.
- The new Approved custom field.
- The new Permission Set you created.
- A bunch of profiles that came unintentionally (we’ll have to deal with them in a minute)
- The custom Travel Expenses tab.
