I develop a web application and push its source code to a public Github repository. The issue is that the PHP code contains database credentials which shouldn't be visible to other people.
Now I'm looking for a good way to handle this. I could exclude the configuration file from the Git repository using .gitignore
, but then others wouldn't see the structure to create their own configuration. On the other hand, I don't want to manually replace the real credentials for every commit.
What is a good way to handle this sensitive information inside the source code of open source software?