1

Some time ago I decided to rename my project and use a capital letter (Remoti instead of remoti). Then, I started having lots of changed files such as in the image:

enter image description here

In the image you can see there are two folders, and thus two different files, which also give different merge conflicts.

I have also tried to do git config --global core.ignorecase false which resulted in what's actually happening.

Is there anything I can do to go back to normal?

Thanks in advance!

noloman
  • 11,411
  • 20
  • 82
  • 129
  • Well I meant not to have these files duplicated. Is it really normal? I haven't renamed any other project, but I don't see it happening in my other projects. – noloman Jan 10 '22 at 19:40
  • because I'm still a newbie to iOS/Xcode/Swift and my OCD doesn't allow me to have all my projects start with an uppercase letter and this one with a lowercase letter :( – noloman Jan 10 '22 at 21:44
  • Note that `core.ignorecase` tells Git how your OS / file system behaves. Changing the `core.ignorecase` setting is rarely a good idea. It *is* useful for certain special purposes, where lying to Git causes it to behave incorrectly in a fashion that is useful for that special purpose, but once you're done with lying to Git, change it back so that Git knows the truth about the system. – torek Jan 11 '22 at 04:23
  • 1
    The root of the problem is that Git *is* case sensitive, even if you OS is not. Git will always be case sensitive. That means Git can store *two different files*, one named `README` and one named `ReadMe` (and a third one named `readme` and so on) all in the same place in one commit. Your OS won't, though, so Bad Things happen. The `core.ignorecase` setting lets Git know which bad things are likely to happen, but doesn't stop them from happening. Setting it to `false` tells Git that no bad things happen. – torek Jan 11 '22 at 04:25
  • in case someone is still coming to this question, NONE of the links above worked for me, only https://stackoverflow.com/questions/3011625/git-mv-and-only-change-case-of-directory/3011723#3011723 – noloman Mar 09 '22 at 13:07

0 Answers0