Skip to Content
CLIWorkflowsDeploy a Feature Branch

Deploy a Feature Branch to Sandbox

The everyday inner loop: take a feature branch from “code complete” to “deployed and verified in a sandbox.”

Check out the branch

git checkout feature/my-feature

Verify the changelog is current

sfdt changelog check

Exits 1 if you have uncommitted changes but an empty [Unreleased] — a cheap gate that keeps your history documented.

Validate the branch

sfdt preflight

Checks branch naming, test presence, and changelog state. Add --strict to fail on warnings.

Run Apex tests

sfdt test

If tests fail and AI is enabled, sfdt offers a failure analysis with concrete fixes.

Generate a manifest from the git diff

sfdt manifest

Diffs main...HEAD and writes manifest/release/preview-package.xml. Add --ai-cleanup to have AI flag likely missing dependencies.

Deploy

sfdt deploy

Preflight runs again internally; pass --skip-preflight to skip the repeat.

Smoke-test

sfdt smoke

Targeting a non-default sandbox? Add --org <alias> to deploy, smoke, and manifest is diff-based so it’s org-agnostic.

Last updated on