Curious if there is a way to configure git to work around a standard annoyance I've had with configuration files.
I have a few configuration files that are required for our software that have a number of intellegent defaults. I would like to keep this default file in git so that anyone checking out the project will get a file that has sane defaults, but I also want someone to be able to modify the file without creating a conflict on merge.
In the past I've seen people create a config.default file and have people rename it to config.cfg (or whatever it should be named) after the clone the repo, with config.cfg in the gitignore file. However, I'm wondering if there's any way to include the config file in git as config.cfg so that it's already included with a git clone and our code works 'out of the box' without any scripts to rename it from config.default to config.cfg, but also prevent git from complaining about any merge conflicts if anyone changes the default settings after a clone.
In short, I want to store the default file in git to be loaded if no config.cfg file exists, but if one already exists ignore that file as if it was in the .gitignore directory. Is there a feature that does this in git?