{ "uuid": [ { "value": "4f6883d1-6421-4350-8ca5-7bfc57da20e9" } ], "langcode": [ { "value": "en" } ], "type": [ { "target_id": "daily_email", "target_type": "node_type", "target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7" } ], "revision_timestamp": [ { "value": "2025-05-11T09:00:30+00:00" } ], "revision_uid": [ { "target_type": "user", "target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849" } ], "revision_log": [], "status": [ { "value": true } ], "uid": [ { "target_type": "user", "target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849" } ], "title": [ { "value": "Which branch should be in which environment?\n" } ], "created": [ { "value": "2023-09-26T00:00:00+00:00" } ], "changed": [ { "value": "2025-05-11T09:00:30+00:00" } ], "promote": [ { "value": false } ], "sticky": [ { "value": false } ], "default_langcode": [ { "value": true } ], "revision_translation_affected": [ { "value": true } ], "path": [ { "alias": "\/daily\/2023\/09\/26\/which-branch-should-be-in-which-environment", "langcode": "en" } ], "body": [ { "value": "\n

A common question is which [Git] branch should be on which environment.<\/p>\n\n

Most projects I've worked on have two or more environments: production, staging (or test) and development.<\/p>\n\n

Earlier in my career, we used Git Flow heavily. A Git branching workflow based on having different branches - i.e. develop<\/code>, master<\/code> and any arbitrary short-lived feature, hotfix and release branches.<\/p>\n\n

These matched nicely with our three environments.<\/p>\n\n

Usually, the develop<\/code> branch would be used in the development environment. The master<\/code> branch would be on staging and a tagged release from master<\/code> on production.<\/p>\n\n

What about now?<\/h2>\n\n

I prefer trunk-based development, where there is one long-lived branch to which everyone commits their changes.<\/p>\n\n

There's only one branch, so you can either follow continuous deployment and use the same branch for all environments - including production - or separate production using a dedicated branch or tag if you need more control.<\/p>\n\n

The mainline branch is used in all pre-production environments, such as staging and development.<\/p>\n\n

What about differences between the environments?<\/h2>\n\n

What if we need differences, such as a feature that must be enabled in a particular environment if the same code is on both?<\/p>\n\n

My go-to approach is feature flagging, and this approach is something I'll describe more in tomorrow's email.<\/p>\n\n ", "format": "full_html", "processed": "\n

A common question is which [Git] branch should be on which environment.<\/p>\n\n

Most projects I've worked on have two or more environments: production, staging (or test) and development.<\/p>\n\n

Earlier in my career, we used Git Flow heavily. A Git branching workflow based on having different branches - i.e. develop<\/code>, master<\/code> and any arbitrary short-lived feature, hotfix and release branches.<\/p>\n\n

These matched nicely with our three environments.<\/p>\n\n

Usually, the develop<\/code> branch would be used in the development environment. The master<\/code> branch would be on staging and a tagged release from master<\/code> on production.<\/p>\n\n

What about now?<\/h2>\n\n

I prefer trunk-based development, where there is one long-lived branch to which everyone commits their changes.<\/p>\n\n

There's only one branch, so you can either follow continuous deployment and use the same branch for all environments - including production - or separate production using a dedicated branch or tag if you need more control.<\/p>\n\n

The mainline branch is used in all pre-production environments, such as staging and development.<\/p>\n\n

What about differences between the environments?<\/h2>\n\n

What if we need differences, such as a feature that must be enabled in a particular environment if the same code is on both?<\/p>\n\n

My go-to approach is feature flagging, and this approach is something I'll describe more in tomorrow's email.<\/p>\n\n ", "summary": null } ], "feeds_item": [ { "imported": "1970-01-01T00:33:45+00:00", "guid": null, "hash": "3b27ec6a81d5e6dcf310dfe3e6204b69", "target_type": "feeds_feed", "target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76" } ] }