I have a project that requires some configuration files. I want to keep the default configuration filse in the repository. However, I want don’t want to have to specify the -X flag for every commit I do. Is there a standard way to mark a set of revisioned files as permanently excluded from commits?
Share
Interesting question, I hope you get a better answer. Faced similar problems, I have done the following:
Rename the configuration files, so that for example, instead of
noweb.cfgI havenoweb.cfg.default. This file changes seldom and is kept under revision control.The actual configuration file,
noweb.cfg, may change frequently but is put in the.hgignorefile so it is never committed.At need I have a special Makefile target that rebuilds
*.cfgfrom*.cfg.default.This solution is not ideal because changes in the
.cfgfiles are lost when the.cfg.defaultchanges. In principle you could tackle this issue with diff3 or some more sophisticated merge tool, but I have never been energetic enough to go there.