Sometimes when you’re working with your local copy you might have configuration settings stored that you do not wish to commit and is impractical to ignore the file because it also contains application specific settings.
For example, a Django settings.py file contains both database connection details and project settings, such as which applications to load.
Is there a way to sanitize these types of files when they are committed? And is there a way to restore your own local settings during a checkout again?
My current environment is Linux and command line SubVersion
One way to address this problem is to keep the “standard” configuration file in a different file altogether, such as
settings.py.example. In your working copy, you would copysettings.py.exampletosettings.pyand work with the copy. If you need to make a change to the standard configuration, changesettings.py.exampleand check it in. Otherwise, you wouldn’t need to change it, and your modifiedsettings.pyisn’t even in version control so it doesn’t get noticed (you can include it in thesvn:ignoreproperty to make it even more quiet).