I have a following scenario, in my Rails app, but scenario can be adopted to any other application, where you don't want to push your development credentials to public repository like Github.
So I have file
git rm --cached config/database.yml
# Ignore config/database.yml
database.yml to version control. Add it to
Instead commit a copy called
example.database.yml with some dummy values. Then your deploy process copies the example and substitutes the secret values.
Otherwise you'll be stuck in a maintenance nightmare of ignoring the config file and then temporarily un-ignoring it when you need to make framework changes, and always lurking the danger of accidentally committing a password to version control.