Basically, I have a file index.php
which should be different in each server. The file indicates which server it is on.
It has something like this:
On the DEVELOPMENT environment:
define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
On the TESTING environment:
define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'testing');
On the PRODUCTION environment:
define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'production');
What's the proper way to maintain these files on each server without Git touching it?
I've added the file to .gitignore
now, and I've untracked it using git rm --cached index.php
then git push origin master
for TESTING server and stable
for PRODUCTION server.