Does anyone know of a technique to prevent someone (me!) accidentally committing a file with a public database connection string in it to Google Code. I need to run some unit tests on the database from my local machine (to update the DB schema) but I’m concerned that I’ll forget that I’ve changed the connection to point to the public DB and then check the code into SVN.
Of course it’s not likely to happen the first time but probably after 5 or 10 times.
What’s the easiest way to handle this?
I second Emil H proposal with one addition: you should ignore via svn:ignore-property the correct configuration file
eg your config-file should reside on:
then you should ignore this file for subversion:
and copy the app.conf to app.conf.example and add this file to subversion: cp app.conf app.conf.example svn add app.conf.example
Now Subversion will never try to add your app.conf file to your repository(and also your colleagues cannot accidentially commit this file!)