From 6acca70628d35731d5e0b3d935236b9f7709fcc8 Mon Sep 17 00:00:00 2001 From: Ulrik Andersen Date: Thu, 5 Sep 2024 20:57:46 +0200 Subject: [PATCH] Document git workflow in README --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 29da883d..15eeb982 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,23 @@ Clone the repository and consult the articles on [running Shape Docs locally](ht git clone git@github.com:shapehq/shape-docs.git ``` +## 🔀 Git Workflow + +Two long-lived branches exist + +* **main** (stable/release - deploy to a **production** environment) +* **develop** (integration - deploy to a **staging** environment) + +**Do's 👍** + +1. Features are branched off from `develop` and merged back in using a PR when ready. Rebase or merge `develop` in to keep the feature branch up to date. Squash merge the feature branch into `develop`. +2. `develop` is merged into `main` whenever a new release is made. Only regular merge commits are allowed in this case. You do not need to "bring develop up to date" with `main` before merging. +3. A hotfix is applied by branching out from `main`. The hotfix branch _must_ be merged into both `main` and `develop`. + +**Don'ts 🙅‍♂️** + +1. Never squash merge `develop` into `main` ☠️ + ## ❤️ The Product of a Shape Weekend Every year we go on Shape Weekend, three days where all employees in Shape get together for a hackathon to build amazing products. In 2023, a team of Shape developers with a passion for documentation and spec-driven development built Shape Docs and we've used it daily ever since!