The .gitignore file successfully ignores all web.config files. This was not always the case. There are lingering historical references to the web.config files. Now occasionally, the web.config files are reverted without warning to a previous state. When developers make changes to restore web.config files no differences are noted as expected.
What explains the unexplained behavior of reverting to a previous version and how can it be stopped? I would prefer not to alter the entire history of the repository but that is permitted for my ends.
-- EDIT -- I found a partial solution. The only problems to this is that it changes my history to include web.config files and then it deletes them. I now think the right thing to do is to override the history even on the server by removing all references to config files from the very beginning.