I'm wondering if there is some trick to keep a file in the repository that will be fetched by anyone checking out the repository, but that will never be committed to the repository unless some kind of explicit action is performed.
Basically, what I'm looking for is a way to have files with default values that can be modified locally without affecting the repository.
I know of two ways to kind of do this, but I'm looking for a better way:
- Have the developers make a changelist that ignores the files on commit. (pro: the project compiles out-of-the-box, con: some developers might inadvertently check in changes related to their local configuration.)
- Keep a copy of the file in the repository with an extension such as .default or .template, and have the developers copy it. (pro: no risk of checking in changes inadvertently, con: does not compile without copying the template files.)
Both of these solutions require additional action from the developers, and I'm afraid I can't trust that everyone will follow the correct procedures... Is there a way to make the process transparent to the developers?