I wouldn't manage those files with git at all. I'd put them in your .gitignore
so git would ignore them, and put template files (such as foo.template
for a file named foo
, or maybe template/foo
) into git. Then when you clone the repo, you can copy them out, and modify them, and git won't do anything with the copies, while still managing the templates. If you have several such files, you can supply a script or make rule or something of the sort to populate all of your config files from their templates, to make it easier to get set up.
A better design would be to separate project config from local config, or have project level defaults that can be overridden in a separate local file. The project level files get committed, the local files get ignored, and they are both used. Perhaps some config settings only make sense for the project and some only make sense locally, in which case you just pull the appropriate setting from the appropriate file; or you could use the project setting as defaults, and let the local config override the defaults. This way, you can update the project settings, which are shared, for everyone at once, while not interfering with people's local settings. Of course, this depends on having control of the settings format; if you're using a third-party tool that takes its settings in a particular format, all mixed into one file, you'll probably have to use the template approach.