How to deal with custom configuration on versioned files? – git
This question already has an answer here:
How do you deal with configuration files in source control?
One Solution collect form web for “How to deal with custom configuration on versioned files? – git”
I’m not sure what you mean by “don’t really want to have them moving the .ignore file all that much”, but you should stick with the advice you originally found and put files that shouldn’t be added in the ignore file as intended. That’s what it’s there for and there’s no harm at all in filling it with files that not everyone will have.
Some other tools you can employ are:
- commit a template for the config file (for example
config.sample) and have your build script do a copy from
config.sampleto the ignored
configif (and only if) it doesn’t already exist
- enhance your configuration system to include overlays. For example
config.local, which is ignored, overrides settings loaded from
config.sharedwhich is tracked.
- enhance your configuration system to allow for includes. For example a line like
%include ~/settingswhich people can put their own config into
All of those, however, presuppose you’re ignoring a config file which varies by user, because that’s what you should do. 🙂