Answer the question
In order to leave comments, you need to log in
How can I set up git to hide a file from the public but still upload it to the production server?
I want to connect people to work with the repository, but at the same time hide the main settings file from the public. This can be done via .gitignore, but I want to load the version with the hidden file that only I can see when uploading the repository to the production server.
Answer the question
In order to leave comments, you need to log in
I save the settings in .env, add it to .gitignore and run everything with foreman. On the server, settings are also stored in environment variables (I use heroku).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question