Lately I’ve been discovering that the entire contents of various PHP files have been duplicated. A file 1,000 lines of code long suddenly becomes 2,000 lines of code the next time I open it. It is the same 1,000 lines of code, just written in the file twice.
The line colors also changes to show that I was the sole developer who has ever worked on that file, when in reality I had either never worked on that file or only made a small modification to it at some point in the past. It makes it look as if I copied and pasted the entire page twice, even though I did not. This has happened in at least 3 files (that I know of), otherwise I would blame absent-mindedly copying and pasting the contents in twice.
It doesn’t seem to happen for any special reason. It has happened to files that I have edited before, and to files that I have never touched before.