0

Whenever I make changes to my create component in ./src/app/core/system/Agent/Create, my Source Control in VsCode is making it pick up as two separate folders, one in uppercase and one in lowercase:

enter image description here

As you can see in the folder below, there isn't another folder in lowercase just the one I've made changes to:

enter image description here

I've tried ignoring case using git config core.ignorecase true from what I've seen suggested but this hasn't done anything.

1
  • General rule, for most people: never change the core.ignorecase setting. Rule for Git experts: almost never change the core.ignorecase setting. :-) Changing the setting lies to Git, making it misbehave. The misbehavior is predictable, and in some rare cases, useful, but it's not a good idea generally. The double rename trick you used works fine everywhere. Commented Aug 11, 2021 at 19:06

2 Answers 2

2

There are, in fact, two folders whose names differ only in case. Git is case sensitive, since Unix systems are case sensitive and because it's impossible to correctly fold case in a locale-insensitive way.

You added two such directories and Git tracked them both, but you're on Windows, and by default, Windows ignores case, and so it's only possible to put one of them in the working tree. This is a limitation of Windows, not Git.

The Git FAQ contains an entry that deals with this scenario, which usually shows up as one file always being modified. What you shouldn't do is modify core.ignorecase, because Git sets that in the repository based on what it detects your file system is capable of. Changing the option doesn't change whether your file system is sufficiently capable, but it can make Git behave in bizarre ways which you probably weren't expecting on Windows.

Sign up to request clarification or add additional context in comments.

Comments

0

I changed the folder to something completely different and then changed it back and this then fixed the issue

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.