Answer the question
In order to leave comments, you need to log in
How to hide a file on Github?
Let's say I'm writing a website in PHP (optional).
There is a config.php file, in which the login and password are in the database.
When committing, it is uploaded to the server.
What to do? After all, it can be brazenly stolen?
How do they act in such situations?
Answer the question
In order to leave comments, you need to log in
config.php should be de-indexed (added to gitignor) and not included in commits at all.
Instead, include the config-EXAMPLE.php file in the index, which will not contain your actual settings, but only configuration examples.
How do they act in such situations?all settings go in environment variables
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question