Skip to content

Development and Deployment

  • main → production code only.
  • staging → integration/testing before production.

  1. Start from staging for new work:
Terminal window
git checkout staging
git pull origin staging
git checkout -b feature/your-feature
  1. Do your work on feature/your-feature.

  2. Open a PR into staging.

    • Staging gets deployed to your staging server automatically (CI/CD).
    • QA/testing happens here.

  1. When staging is stable:
Terminal window
git checkout main
git pull origin main
git merge staging
git push origin main
  1. main is then deployed to production.

If production is broken:

  1. Branch from main:
Terminal window
git checkout main
git pull origin main
git checkout -b hotfix/urgent-fix
  1. Fix → PR into main.
  2. After merging, also merge into staging to keep them in sync.

  • Dev branches → local testing (http://localhost:3000).
  • Staging branch → deployed staging server (https://staging.gigmanager.com).
  • Main branch → production server (https://gigmanager.com).

Use CI/CD (GitHub Actions, GitLab CI, etc.):

  • Push/merge to staging → auto-deploy staging server.
  • Push/merge to main → auto-deploy production.

Summary:

  • Developers experiment in isolated branches.
  • Staging always reflects “next release candidate.”
  • Main always reflects “live production.”