Sync

Commands to help sync your orgs

sfp sync org

Syncs changed packages to a target org using branch comparison or org-installed artifacts as baseline

USAGE
  $ sfp sync org -o <value> [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url
    <value>] [-b <value>] [--basebranch <value> | --from-org] [--dryrun] [--include-not-installed] [-v <value>] [-p
    <value>...] [--releaseconfig <value>...] [--diff-deploy] [--sourcepackageoverride] [--waittime <value>]
    [--reset-tracking] [-g <value>...] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -b, --branch=<value>              [default: HEAD] Target branch to sync (defaults to HEAD for org-based mode)
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -o, --targetorg=<value>           (required) Username or alias of the target org.
  -p, --packages=<value>...         Comma-separated list of package names to sync
  -t, --application-token=<value>   Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                    (CLI flags take precedence over env vars).
  -v, --devhubalias=<value>         Username or alias of the Dev Hub org.
      --basebranch=<value>          Base branch to compare against for detecting changes (branch-based mode)
      --diff-deploy                 Deploy only the changed files directly to the org, skipping the full build pipeline.
                                    Uses RunRelevantTests. Untracked - no artifact records are created.
      --dryrun                      Preview changes without building or deploying (org-based mode only)
      --from-org                    Use org-installed artifacts as baseline instead of git branch comparison (org-based
                                    mode)
      --include-not-installed       Include packages not installed in org (org-based mode only, default: true)
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --releaseconfig=<value>...    Path to release config file to filter packages by domain
      --repository=<value>          The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                    for Azure DevOps
      --reset-tracking              Reset source tracking after successful sync. Use this when syncing to
                                    source-tracking enabled orgs (scratch orgs, sandboxes) so that project status
                                    reflects the synced state.
      --sfp-server-url=<value>      URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                    config:set server-url
      --sourcepackageoverride       Override unlocked packages to source packages during build
      --waittime=<value>            [default: 120] Wait time for deployment to finish in minutes

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Syncs changed packages to a target org using branch comparison or org-installed artifacts as baseline

EXAMPLES
  # Branch-based sync (compare two git branches)

  $ sfp sync -o <username> --branch feature/test --basebranch main

  $ sfp sync -o <username> --basebranch main --branch feature/test --devhubalias mydevhub



  # Org-based sync (use installed artifacts as baseline)

  $ sfp sync -o <username> --from-org --dry-run

  $ sfp sync -o <username> --from-org --branch feature/test

  $ sfp sync -o <username> --from-org --include-not-installed=false

See code: src/commands/sync/org.tsarrow-up-right

Last updated

Was this helpful?