Changes to config setup

I thought it might be beneficial for git to ignore config.js. This way people can't accidentally publish API keys and database passwords, or whatever ends up in config.js. People wishing to test the site must now make a copy of config.example.js called config.js. Oppinions? Is this a bad idea? Is there a better way to do it?