org enable tracking

Allow Salesforce CLI to track changes in your source files between your project and an org.

Description for org enable tracking 

Enabling source tracking has no direct effect on the org, it affects only your local environment. Specifically, Salesforce CLI stores the setting in the org’s local configuration file so that source tracking operations are executed when working with the org.

This command throws an error if the org doesn’t support tracking. Examples of orgs that don’t support source tracking include Developer Edition orgs, production orgs, Partial Copy sandboxes, and Full sandboxes.

Flags 

Flag Name (Long)Flag Name (Short)Description
‑‑flags‑dirN/AType: Value

Import flag values from a directory.
‑‑jsonN/AType: Boolean

Format output as json.
‑‑target‑org‑oType: Value
Required

Username or alias of the target org. Not required if the target-org configuration variable is already set.

Examples for org enable tracking 

Enable source tracking for an org with alias “myscratch”:

1sf org enable tracking --target-org myscratch

Enable source tracking for an org using a username:

1sf org enable tracking --target-org you@example.com

Enable source tracking for your default org:

1sf org enable tracking