motdotla/dotenv — pull request #35 by defunctzombie (2014-09-21 05:51:59+00:00)
Title: read .env.local for environment overrides

The .env.local file is read last and provides a convenient workflow for environment overrides that will not be checked in to your repo (often being ignored via .gitignore).

A typical repo will have the following file setup:

`.env` baseline variables that are relevant for event situation
`.env.development` loaded by default if no NODE_ENV is specified (possibly omitted in favor of dev defaults living in .env)
`.env.local` never checked in and allows the developer to temporarily override env vars without the fear of checking in the changes.

When doing dev, I might temporarily change the redis server or some other env flag and want to make sure I don't check in this change. I would make this change in my .env.local file (or create one if it doesn't exist) and put the flag there. Git will ignore it and I won't check in my local only env.