I have a database.php. I want to keep it in my github repository without any sensitive information.
First I pushed to my repository without any sensitive info.
You should use a filter driver able to:
smudge
script, detect the content (those 'filter driver' scripts don't have the name of the files they are filtering) of a database.template
database.php
, based on the values of a:
database.private.value
file (also always ignored)database.private.value
isn't found (which is the case for your user cloning your repo), a database.public.value
file (which is pushed to the remote repo)clean
) step.You should make 2 different files one actual database.php
and one database.php.example
or something like that and then add database.php to .gitignore