I'm using git on Windows. I once added a file, then changed a letter in upper case, added it again with the new name. From then, I always had the two files (once with upper case, once not).
myFile.ext
myfile.ext
Git always interpreted it as two distinct files (as it was configures case sensitive) but it was actually the same file, so it was tracking this file two times, once under each name.
I have now deleted the upper case file from the repo with
git rm --cached myFile.ext
So I have now only one track of my file, and that's all good.
myfile.ext
The problem is that if I want to make a checkout on an older commit, git says :
error: The following untracked working tree files would be overwritten by checkout: myFile.ext Please move or remove them before you can switch branches. Aborting
However, I can't do anything with this file, because it's not in the working tree nor in the index. I tried to move the file, remove the myfile.ext
file and add it again, stash, but nothing worked. The myFile.ext
doesn't show in the git status
and is not in the gitignore.
How can I solve this?