|
| 1 | +# summary |
| 2 | + |
| 3 | +Preview a deployment to see what will deploy to the org, the potential conflicts, and the ignored files. |
| 4 | + |
| 5 | +# description |
| 6 | + |
| 7 | +You must run this command from within a project. |
| 8 | + |
| 9 | +The command outputs a table that describes what will happen if you run the "sf deploy metadata" command. The table lists the metadata components that will be deployed and deleted. The table also lists the current conflicts between files in your local project and components in the org. Finally, the table lists the files that won't be deployed because they're included in your .forceignore file. |
| 10 | + |
| 11 | +If your org allows source tracking, then this command considers conflicts between the org and local. Some orgs, such as production orgs, never allow source tracking. Use the "--no-track-source" flag when you create a scratch or sandbox org to disable source tracking. |
| 12 | + |
| 13 | +To preview the deployment of multiple metadata components, either set multiple --metadata <name> flags or a single --metadata flag with multiple names separated by spaces. Enclose names that contain spaces in one set of double quotes. The same syntax applies to --manifest and --source-dir. |
| 14 | + |
| 15 | +# examples |
| 16 | + |
| 17 | +- NOTE: The commands to preview a deployment and actually deploy it use similar flags. We provide a few preview examples here, but see the help for "sf deploy metadata" for more examples that you can adapt for previewing. |
| 18 | + |
| 19 | +- Preview the deployment of source files in a directory, such as force-app: |
| 20 | + |
| 21 | + <%= config.bin %> <%= command.id %> --source-dir force-app |
| 22 | + |
| 23 | +- Preview the deployment of all Apex classes: |
| 24 | + |
| 25 | + <%= config.bin %> <%= command.id %> --metadata ApexClass |
| 26 | + |
| 27 | +- Preview deployment of a specific Apex class: |
| 28 | + |
| 29 | + <%= config.bin %> <%= command.id %> --metadata ApexClass:MyApexClass |
| 30 | + |
| 31 | +- Preview deployment of all components listed in a manifest: |
| 32 | + |
| 33 | + <%= config.bin %> <%= command.id %> --manifest path/to/package.xml |
| 34 | + |
| 35 | +# flags.target-org.summary |
| 36 | + |
| 37 | +Login username or alias for the target org. |
| 38 | + |
| 39 | +# flags.target-org.description |
| 40 | + |
| 41 | +Overrides your default org. |
| 42 | + |
| 43 | +# flags.metadata.summary |
| 44 | + |
| 45 | +Metadata component names to preview. |
| 46 | + |
| 47 | +# flags.source-dir.summary |
| 48 | + |
| 49 | +Path to the local source files to preview. |
| 50 | + |
| 51 | +# flags.source-dir.description |
| 52 | + |
| 53 | +The supplied path can be to a single file (in which case the operation is applied to only one file) or to a folder (in which case the operation is applied to all metadata types in the directory and its subdirectories). |
| 54 | + |
| 55 | +If you specify this flag, don’t specify --metadata or --manifest. |
| 56 | + |
| 57 | +# flags.manifest.summary |
| 58 | + |
| 59 | +Full file path for manifest (package.xml) of components to preview. |
| 60 | + |
| 61 | +# flags.manifest.description |
| 62 | + |
| 63 | +All child components are included. If you specify this flag, don’t specify --metadata or --source-dir. |
| 64 | + |
| 65 | +# flags.ignore-conflicts.summary |
| 66 | + |
| 67 | +Ignore conflicts and deploy local files, even if they overwrite changes in the org. |
| 68 | + |
| 69 | +# flags.ignore-conflicts.description |
| 70 | + |
| 71 | +This flag applies only to orgs that allow source tracking. It has no effect on orgs that don't allow it, such as production orgs. |
| 72 | + |
| 73 | +# flags.concise.summary |
| 74 | + |
| 75 | +Omit ignored files. |
| 76 | + |
| 77 | +# flags.api-version.summary |
| 78 | + |
| 79 | +Target API version for the preview. |
| 80 | + |
| 81 | +# flags.api-version.description |
| 82 | + |
| 83 | +Use this flag to override the default API version with the API version of your package.xml file. The default API version is the latest version supported by the CLI. |
| 84 | + |
| 85 | +# error.Conflicts |
| 86 | + |
| 87 | +There are changes in the org that conflict with the local changes you're trying to preview. |
| 88 | + |
| 89 | +# error.Conflicts.Actions |
| 90 | + |
| 91 | +- To overwrite the remote changes, rerun this command with the --ignore-conflicts flag. |
| 92 | + |
| 93 | +- To overwrite the local changes, run the "sf retrieve metadata" command with the --ignore-conflicts flag. |
0 commit comments