Hey everyone!
I'm trying to understand how companies typically manage staging and production environments, and what the industry best practices are.
I've mostly worked on smaller projects, but I'm now working on a project where I need to introduce a proper staging environment alongside an existing production environment. I want to make sure I'm approaching this correctly rather than creating unnecessary complexity.
A few questions I have:
Repository structure: Do companies typically keep staging and production code in the same Git repository, using separate branches (e.g., main for production and staging for staging)?
Separate repositories: Is it ever common to have two completely separate repositories, one for staging and another for production? If so, how are changes migrated between them?
Deployment: Do both environments usually have their own deployments, servers, and domains/subdomains (e.g., staging.example.com and example.com )?
CI/CD: How is the deployment process typically handled?…