I'm having some problem developing a web application with various developers, each one has an specific configuration to work.

and i would like to use the less resource cosuming approach to avoid that any personal configuration goes to the repository.

the basic idea is: to have a config file with all the pairs of key/values to store the configuration and substitute specific constants inserted in the code with the correpondent value in the code.

I'm pretending to replace the values in the code with the key text using this syntax {@KEY_TEXT} in pre-commit and executing the opposite operation in the post-merge hook

i'm doing this right? there's a more efficent way to do this?

EDIT: Why i don't have all debug configuration in a single file, because all this values are inserted accross various files / and involves lot of different programming languages and differente context.

i'm Using PHP/javascript/Shell/Batch file Language (Windows). in a cross plataform enviroment

1 Answer 1


How about simply not committing the debug config file?

The production config file can still be in source control with a different name. Just have your build/packaging scripts rename it during build/packaging.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.