If the file is never changed by anybody else (and never run git commit -a
), you can keep your modified version, but it will always show up in diffs and the status output. Once you track a file, you're telling Git that you care about it, so it will try to merge/update when you update the working directory.
The usual recommendations for this kind of situation is have a config.sample
file (assuming config
is the where the app reads the configuration from) where you store the defaults, and have every user rename that to config
and set their own configuration.
Alternatively, have the config file include a config.local
that overrides the default settings, if that's something the config language allows.
This usually would also make testing and deployment simpler by not having tracked files that change between uses, and would make the deployment/installation scripts much less likely to overwrite a user's local configuration.