I have two files that have been renamed from lowercase to uppercase and the most frustrating and out-of-left-field crazy thing happened. Git now sees TWO COPIES, one with the upper case name and one with the lower case name of each file. Let me be clear: no such lower case files exists. Git is literally seeing imaginary files.
In order to commit a change to either of these files, I have to commit "both" the real file and the imaginary file. Attempting to discard one unstaged file will create a removal of the changes in the opposite case, e.g. discarding server.h will create Server.h with reversal of changes, and vice versa, thus deletion is impossible.
- 2 files
- initially lowercase (server.h, server.cpp)
- renamed to uppercase (Server.h, Server.cpp)
- Git now sees TWO COPIES
- "git status" output:
modified: Server.h
modified: Server.cpp
modified: server.h <---- (doesn't exist)
modified: server.cpp <---- (doesn't exist)
- "git status" output:
The duplicate files server.h and server.cpp, in all lowercase, do not exist, as noted above.
I have attempted changing .git/config to enable case sensitivity, which doesn't change anything. What else could be causing these duplicate, imaginary files?
Edit: as noted above, enabling or disabling case sensitivity settings did not solve the problem, and attempting to remove either file doesn't work.