Many frameworks like Rails or Laravel do provide support for different environments from default which you can specify via environment variables oder they get detected automatically via hostname or stuff like this.<p>I don't like it to put hostnames and/or credentials into the repository to make it ready for different scenarios.<p>I tend to create an .env file for every environment which exists. This also includes a production and development environment for my local machine because I want to see how the application behaves when set to production and of course even if I'm in "production" on my dev machine I use a different database than on a real server.<p>What do you think about this approach?