-
Notifications
You must be signed in to change notification settings - Fork 7
Git Management
Damon Vinciguerra edited this page Mar 26, 2026
·
2 revisions
This repo uses three long-lived branches: dev, staging, and prod. The flow is designed to keep development moving quickly while ensuring stable releases.
-
dev: Active development branch. All feature work targets this branch. -
staging: Pre-production branch. Mirrors what we intend to ship next. -
prod: Production branch. Always reflects what is live.
-
Branch off
dev- Create feature branches from
dev. - Example:
feature/add-event-end-date
- Create feature branches from
-
Open a PR into
dev- Run local tests.
- CI must pass.
- Code owner reviews required.
-
Squash merge into
dev- Keeps history clean and focused.
graph TD
A[dev] -->|branch| B(feature/xyz)
B -->|PR & squash merge| A
-
PR:
dev→staging- This is a commit merge (no squash).
- Preserves full commit history for release tracking.
-
Test on staging apps
- Validate behavior in staging environment.
-
PR:
staging→prod- Also a commit merge (no squash).
- This is the production release.
graph LR
dev -->|commit merge PR| staging -->|commit merge PR| prod
After production deployment:
-
Commit merge
prod→staging(no PR)
git fetch origin
git switch staging
git pull
git merge origin/main
git push origin staging-
Commit merge
staging→dev(no PR)
git fetch origin
git switch dev
git pull
git merge origin/staging
git push origin devThis ensures all release metadata and hotfixes are fully synced downstream.
graph LR
prod -->|commit merge| staging -->|commit merge| dev
-
Squash merges into
devkeep feature work tidy. - Commit merges between long-lived branches preserve release history.
- Back-merging after prod prevents drift and keeps branches aligned.