To add version control to a managed environment, enter this command at the command line prompt in your Salesforce CLI command shell:
$ sf prodly:version [OPTIONS]
Usage
$ sf prodly:version -s <value> -v <value> -o <value> [--json] [-b <value>] [-i <value>]
This table lists all the available options:
-b, --new-branch=<value> | If provided it creates a new branch based on the source branch that will be used for |
-i, --instance=<value> | Managed instance ID on which to perform the action. |
-s, --source-branch=<value> | The version control branch or the base for the new branch (if provided). |
-o, --target-org=<value> | Use to specify the username or alias of the destination environment, overriding any default scratch org you specified in the optional setup steps. Not required if the default value is already set. |
-v, --target-dev-hub=<value> | Use to specify the username or alias of the dev hub org, overriding any dev hub org you specified in the optional setup steps. Not required if the default value is already set. |
--json | Use to receive an output response. When included, the response is in JSON format. When not included, no response is given. |
-x , --unlink | Use to unlink the branch from the managed instance. |
Examples
Command | Result |
---|---|
$ sf prodly:version -s main | Add version control to the managed instance identified by the target org. Use the “main” branch. The instance should be managed by the Prodly account associated with the default DevHub control org. |
$ sf prodly:version -s main -b cli-branch -i f50616b6-57b1-4941-802f-ee0e2506f217 | Add version control to the managed instance identified by the provided ID. Use the “main” branch as a base for a new branch called “cli-branch” The instance should be managed by the Prodly account associated with the default DevHub control org. |
$ sf prodly:version -x -i f50616b6-57b1-4941-802f-ee0e2506f217 | Remove version control from the managed instance identified by the provided ID. The instance should be managed by the Prodly account associated with the default DevHub control org. |