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-featureVerify the changelog is current
sfdt changelog checkExits 1 if you have uncommitted changes but an empty [Unreleased] — a cheap gate that keeps
your history documented.
Validate the branch
sfdt preflightChecks branch naming, test presence, and changelog state. Add --strict to fail on warnings.
Run Apex tests
sfdt testIf tests fail and AI is enabled, sfdt offers a failure analysis with concrete fixes.
Generate a manifest from the git diff
sfdt manifestDiffs main...HEAD and writes manifest/release/preview-package.xml. Add --ai-cleanup to
have AI flag likely missing dependencies.
Deploy
sfdt deployPreflight runs again internally; pass --skip-preflight to skip the repeat.
Smoke-test
sfdt smokeTargeting a non-default sandbox? Add --org <alias> to deploy, smoke, and manifest is
diff-based so it’s org-agnostic.
Last updated on