Newer Version Available
Best Practices
To better work with large sets of metadata, consider using unlocked packages
With source tracking turned on, commands like force:source:pull only operate on changed metadata; not on all metadata. (With source tracking turned off, force:source:pull operates on all metadata.) If you need to work with unchanged metadata, you can do so using unlocked packages.
To learn more about working with unlocked packages, see these helpful resources:
- Trailhead: Unlocked Packages for Customers
- Developer Guide: Unlocked Packages
Review metadata change history with a version control system like Git
With a version control system, you can version your changes, track change history, and review metadata changes before promoting to other environments, like a sandbox.
Check which metadata types support source tracking
Most metadata types support source tracking, but a few metadata types don’t. If a metadata type doesn’t support source tracking, then they require manual replication in production environments. To see which metadata types support source tracking, check the Metadata Coverage Report.
Don’t mix force:source:deploy and force:source:retrieve commands with force:source:push and force:source:pull commands
The force:source:deploy and force:source:retrieve commands don’t support source tracking. If you use them, source tracking gets confused and won’t report accurate changes. When working with source tracking, only use force:source:push and force:source:pull commands.
If necessary, clear source tracking information with force:source:tracking:clear or force:source:tracking:reset
If source tracking gets confused, and starts reporting inaccuracies, you can clear local source tracking information with force:source:tracking:clear or both local and remote source tracking information with force:source:tracking:reset. Be very careful when using these commands, because they can’t be undone, and they reset source tracking for the current CLI user with the targeted org.