A greenfield implementation often builds a new production org and its sandboxes from scratch, usually over 6 to 18 months, usually with a systems integrator or Salesforce Professional Services delivering the build before handing over to an internal team.
With no live users and an empty production org, the usual assumption that production is your source of truth doesn't hold. This guide covers the decisions to make before you build your pipeline, then the four routes for running Gearset until go-live, and how each one carries into business as usual.
đĄ Is this guide for you? It's written for teams building a brand-new org. If you're adding a major new capability to an existing org (for example Data 360 or Agentforce), the branching and release guidance still applies, but your production org already holds live metadata and users, so a Long term project will be the best route.
Part 1: Decisions to make first
Timeframe and milestones
Agree a target go-live date, when the first release will be promoted, and when formal testing phases such as UAT begin. Go-live dates on greenfield projects often move, so choose a setup that works as a long-running state rather than a short interim one. Greenfield projects tend towards a âwaterfallâ style, where itâs usually a much larger release close to the end of a project, but smaller, regular 'agile' releases are more efficient and surface problems earlier.
Starting environments, and how you'll add to them
A typical starting point is developer sandboxes, one shared integration environment (such as QA), and production. Testing environments such as UAT and staging are usually added when those testing phases begin. Plan when each environment joins the pipeline and what value it adds, rather than creating them all up front. Our guide to choosing your environments can help.
How you'll manage production being in the pipeline
Connecting production early, even while it's empty, gives every release a real destination and avoids saving months of work for one very large deployment. With no end users, issues can be fixed forward rather than rolled back.
There are also various pre/post deployment steps that will need managing, along with other activities like tracking DORA metrics that should be considered and add weight to keeping production in the workflow. Some teams prefer to hold production deployments back until features are signed off. That's a choice to consider, but it affects which route suits you (see Part 2) and means planning a large, staged go-live deployment, or leveraging something like feature flagging to counter.
Who is building, and on what cadence
One team releasing together on a regular sprint cadence suits a different route from several teams or partners working to independent schedules. Agree this before choosing a branching model.
How developers will build on each other's work
On a greenfield project, much of the work depends on features that haven't reached production yet. Decide whether developers need each other's work as soon as it reaches the shared integration environment, or can wait until it is released.
Release cadence
Most greenfield teams release in sprints of 1 to 4 weeks. Decide where releases land before go-live: all the way to production if it's connected, or held in your final pre-production environment until go-live.
Part 2: Choose your route
There are four ways to run Gearset between now and go-live for the core metadata deployments. See Comparing the Pipelines expanded branching model and Gitflow for a comparison of the two core branching strategies. Use your answers from Part 1 to pick one.
If this describes you | Consider |
One team or sub-teams all aligned to the same release cadence (for example, two-week sprints), developers need each other's in-progress work to build on, production can be connected early, and one testing environment before production is enough | Route A: Gitflow |
Developers need each other's in-progress work, but you need more testing environments than Gitflow supports, or several teams or partners work to different cadences | Route B: Long term projects as a Gitflow-style build stream |
Features need to move independently, and developers can wait for each other's work until it's released to the final stage | Route C: Expanded branching pipeline into production, or a stand-in |
Team not yet comfortable with Git, partners working on the same org but not together, or the build is too early to define a pipeline | Route D: Compare and Deploy (manual org deployments) until go-live |
Note: There will be certain scenarios where you need to consider org-to-org deployments also for specific clouds or config data, such as Field Service Lightning, so considering how your main pipeline works alongside these custom routes all forms part of the strategy.
Part 3: What applies to every route
Branches must match orgs before you start
Each environment's branch must reflect the work already in that org. Main can stay 'empty' while production is empty, depending on your metadata filter choices.
Agree where changes are made
All changes should start in a developer sandbox and move through the pipeline, as noted in Pipeline setup - choosing your environments. There are pros and cons to using shared sandboxes vs individual, so consider the type of changes being developed, whether work needs building on early, and how those changes need to move in your decision.
Changes made directly in a shared testing sandbox are not visible to the pipeline, so they are never back-promoted automatically under any route, and the pipeline can overwrite them or fail its deployment without a clear reason. If work has been built directly in QA or UAT, pull it into a feature branch and merge it into that environment's branch before the next promotion.
Add developer sandboxes as developer sandboxes, not CI jobs
They are the entry point to the pipeline and don't need their own long-lived branches. Dev Sandbox Updates is a capability that helps keep those sandboxes in sync, without overwriting existing work. Feature branches are created in the pipeline, which opens a comparison from the developer sandbox to the feature branch.
Keep environments in sync through deployments, not refreshes
Refreshing from an empty production org gives you an empty sandbox. Check your sandbox licenses (full, partial, developer) before designing your structure, as they limit the data available and what you can refresh from where.
Use a dedicated integration user for connections
Connect orgs and the repository with a service user rather than one person's credentials, and give each team member their own Gearset login so the audit trail shows who made each change. This also makes transition to business-as-usual development after go-live easier.
Record manual steps from day one
Every new sandbox and release tends to need the same manual pre- and post-deployment steps. Capture them so they can be repeated, and automated where possible.
â Why aren't my developer sandboxes receiving updates? In a feature branch pipeline, developer sandbox updates come from the main branch, after changes are released to the final environment. If your pipeline has no final environment connected to main, nothing merges into main and your developer sandboxes have nothing to receive. Routes A, B, and C each address this in different ways so this will depend on your 'final' environment configured.
Part 4: The routes in Gearset
Route A: Gitflow
How it works. Developers create feature branches from a develop branch mapped to your first shared environment (such as QA), so new work starts from everything already merged there. At the end of each sprint, a release branch is cut from develop and promoted through your testing environments to production as a single unit. Main represents production. See Gitflow in Gearset Pipelines for the details.
Pros
Developers build on in-progress work as soon as it is merged into the shared environment, without waiting for a release, which usually aligns to a structured and phased release way of working.
Less manual back-promotion for work that goes through the pipeline.
Each release is validated once as a whole, with fewer pull requests to manage as the project grows.
Cons
No feature independence: once merged, work moves as one unit, so one unfinished or failing feature can hold up the release.
Doesn't suit several workstreams on different cadences, multiple releases concurrently, or long-term projects running alongside business as usual.
Changes made directly in the shared environment still have to be synced into its branch.
Making it work for greenfield. Gitflow works best when each release reaches its destination every sprint. If go-live is months away and nothing is released to production, one release branch stays open for months and becomes harder to merge the longer it stays open. Connecting production early avoids this: each sprint's release goes all the way through and the next one starts clean. Fix issues found in testing on the release branch, and merge it back into develop once deployed.
Current limitations. Some pipeline features aren't yet available in Gitflow, including long-term projects, continuous delivery rules, automatic sync PRs, and in-app DORA metrics. If you expect to need multiple releases running concurrently, or more than 1 development/production target, Gitflow is highly unlikely to be the right fit.
Route B: Long term projects as a Gitflow-style build stream
How it works. You keep the expanded branching model, but the build itself runs inside a long term project (LTP). The LTP holds your developer sandboxes and a shared integration environment. Developers build on everything that's been merged to the shared integration environment, and its base branch for new features matches that final environment, so developers create feature branches from it and build on everything already merged there, as they would with Gitflow. At the end of each sprint, the project is released into the main pipeline as a single pull request and promoted through your testing environments to the final stage, which can be your real production org or a stand-in sandbox (see Route C). See Long term projects in Gearset Pipelines for setup.
If several teams or partners work to different cadences or clouds, give each its own LTP, with its own sandboxes, so each can release on its own schedule, and a quicker route still exists through to production through the main pipelineâs expanded branching flow.
Pros
Developers build on in-progress work inside the project, as with Gitflow.
The main pipeline can include as many testing environments as you need, such as UAT and staging.
Several workstreams can run in parallel, one LTP each, on different cadences.
Expanded branching features stay available, including release bundling, continuous delivery rules, and DORA metrics.
After go-live, the main pipeline is already your business-as-usual route, and LTPs remain available for later project phases.
Cons
No feature independence inside the project: features are cut from the project branch, so in-progress work moves together.
Each project release contains everything not yet in the next environment, with no cherry-picking, so promote each release through before raising the next one.
Fixes to a release already in testing need to be added to the release branch manually with Compare and Deploy, so keep one sandbox aligned to the open release instead of trying to use the LTP again (which has likely moved onto the next tranche of work)
Workstreams can't share an integration sandbox or branch, so each LTP needs its own environments.
Updates into the project come from main, so other workstreams' work only arrives once it reaches the final stage.
Route C: Expanded branching pipeline into production, or a stand-in
How it works. You keep Gearset's expanded branching model as the primary process. Each piece of work is built in a developer sandbox, committed to its own feature branch created from main, and promoted by pull request through QA and UAT to a final stage connected to main. Once a change reaches the final stage, Gearset offers it to every developer sandbox, and developers accept or decline the update with one click. Work built directly in QA or UAT hasn't passed through main, so back-promote it manually with Compare and Deploy (QA or UAT as the source, a developer sandbox as the target), then clone the package for other developer sandboxes.
There are two ways to provide the final stage:
C1: Release to your real production org now. Production has no users yet, so add it as the final stage today and release to it as work is approved. Production is built up gradually and there's no switchover at go-live, and capabilities could be hidden with feature flags.
C2: A sandbox stands in for production. Connect a spare sandbox to main as the final stage and treat it as production until go-live, then replace it with your real production org, meaning a planned (likely multi-stage) deployment needs to occur from sandbox > production.
Pros
Feature independence: each piece of work moves on its own and can be held back without blocking anyone else.
Pipeline work reaches developer sandboxes automatically once released to the final stage.
It's the same process you'll use after go-live, so there's little to relearn.
C1 only: main always reflects real production. Pre- and post-deployment steps and DORA metrics run against the right org, and nothing needs replacing at go-live.
Cons
Developers only receive each other's pipeline work once it reaches the final stage, not when it reaches QA or UAT.
C1 only: production receives metadata before go-live, so all parties must agree this is the single route into production.
C2 only: pre- and post-deployment steps belong to the final stage, so the real production deployment won't have them; DORA metrics treat the stand-in as production; and you need a spare sandbox.
Route D: Compare and Deploy until go-live
How it works. You don't run a pipeline yet. All changes, including back-promotion to developer sandboxes, are deployed with Compare and Deploy until production is live. You then set up the pipeline with production and main as the starting point.
D1: Compare and Deploy only. Version control isn't used until the pipeline is set up after go-live.
D2: Compare and Deploy, with main kept in sync with production. Each time changes reach production, you also commit them to main, so the repository is ready when you build the pipeline.
Pros
The simplest route to run now, with no branches to keep in sync with orgs.
Suits multiple parties building on the same org without working directly together.
Packages can be cloned and deployed to several developer sandboxes for back-promotion.
Gives the team time to get comfortable with Git and Gearset before running a pipeline.
The pipeline is built once, against a populated production org.
D2 only: no repository catch-up at go-live.
Cons
No version control benefits: no pull request reviews, user story tracking, or automated promotion.
Every deployment is selected by hand, which is slower and risks missing or overwriting components as more people deploy to shared sandboxes.
No formal release bundling, except combining packages in deployment history.
A large go-live deployment is likely (see Part 5).
D2 only: someone must commit production changes to main after each deployment.
Part 5: Going live
Avoid one big release at the end where you can. Regular releases keep each deployment small and surface problems early. If a large go-live deployment is unavoidable (most likely with Route D, or with a stand-in final stage and no regular releases), split it into stages that build the org from the bottom up: data model, then code, then user interface, then permissions and security, then everything else, as outlined in Splitting a complex deployment into stages. The Metadata API also limits deployments to 39 MB and 10,000 files, so large deployments need splitting regardless.
Have a hotfix path ready for day one. Agree how urgent fixes reach production without waiting for the next release, with a dedicated hotfix sandbox/route or the ability to move them through your normal development cycle. For Gitflow, see making hotfixes after a production deployment.
Part 6: Moving to business as usual
Once real users are in the org, changes tend to get smaller and more frequent, and production becomes your source of truth. Decide your post-go-live model before go-live, not after.
Route A: stay on Gitflow with a shorter release cadence, or move to a feature branch model. Moving means changing process a second time, and potentially building a new pipeline to accommodate this, so make the switch at a quiet point, with all work promoted and every environment in sync.
Route B: the main pipeline is already your business-as-usual route, with new work starting from developer sandboxes connected to it. Keep the LTP for later project phases, or retire it once its final release reaches production. With a stand-in final stage, replace it with production as in Route C.
Route C: already your business-as-usual model. With C2, replace the stand-in with production and recreate pre- and post-deployment steps against it.
Route D: build the pipeline against the populated production org. With D1, populate main from production first.
Plan the handover. If a partner delivered the build, agree who owns the pipeline afterwards and train the internal team before go-live. Running a separate project pipeline and business-as-usual pipeline without a plan for bringing them together slows everyone down. This Gitflow in Pipelines FAQs document covers some considerations on switching from expanded branching to Gitflow.
Summary
Greenfield deployments can be tricky to plan, set up, maintain and evolve over the course of the project, so use the above to help guide you on some of the initial decisions needed and relevant considerations, and feel free to reach out to the Gearset team if you need further guidance.
