0

So, i am getting the

error: The following untracked working tree files would be overwritten by checkout:

But the listed files are existing files only with a different casing, eg section.js exist, Section.js is showing as untracked.

git status is clean and shows no untracked files, I've tried git reset --hard but nothing. I've even tried

git config --global core.ignorecase true

But the ghost wrong-cased files are still shown as untracked. What can I do? Is this a bug?

NevNein
  • 415
  • 4
  • 11
  • Does this maybe help you: https://stackoverflow.com/questions/4610561/untracked-files-not-shown-in-git-status – andy meissner Aug 31 '20 at 17:22
  • Are you using a case-sensitive file system, in which you can create two different files named, e.g., `readme.txt` and `README.txt`? Or are you on a system where, if you currently have a `README.txt` and ask the system to create `readme.txt`, it destroys `README.txt` instead and puts your new contents into that file? – torek Aug 31 '20 at 18:07
  • Internally, Git doesn't use the file system in the usual way, so Git can and will hold two files whose name differs only in case. The `core.ignorecase` setting is so that Git can tell what your system will do if it tries to create such files. It does not tell Git *to* ignore casing, it tells Git whether *your computer's filesystem* ignores casing. (This means you should not set it ... and setting it globally has no effect as each Git repository has its own private setting, created by Git when Git created the repository.) – torek Aug 31 '20 at 18:09
  • If I'm reading your posting correctly, your work-tree actually contains a lowercase name, `section.js`, while `git status` is saying that it contains an uppercase named, `Section.js`. If that is the case, perhaps something has gone wrong with the file system monitor option on your OS. See the `--no-fsmonitor` option for `git update-index`. – torek Aug 31 '20 at 18:13

0 Answers0