So I have my local MAMP setup and running a test environment for my projects. When I upload it to the live server for staging I want to keep the passwords and usernames in for example config.php separate from those that are used on the server. This way I won’t need to change those each time I push a commit to the server.
I have been using git add -i which is working out but still would like some feedback on how the workflow of others is looking like.
You should use a gitignore file to ignore
config.php. Then you can keep a separate file locally and on the server that git will ignore.Just make a file in the root of your repo called
.gitignoreand put any file you want to ignore on its own line in the file.