Newer Version Available

This content describes an older version of this product. View Latest

Best Practices

Get the most out of source tracking by following these best practices.

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.