Iâve been caught off guard several times because I develop on macOS, which isnât case-sensitive (`fOo` === `foo` === `FOO`).
In one particularly painful instance, I realized that on a project, the CI was recreating test snapshots every time because the Docker container (running on Linux) executing the tests couldnât find the filesâall because of a single uppercase letter.
All those tests were pointless, but they didnât cause the build to fail.
In fact, the file systems on Windows and macOS are case-insensitive and if you change the case of a file, git will not see this change by default.
You have two options.
A simple workaround is to use the
git mv command as follows:git mv camelcase camelCase git commit -m "fix camelCase name"
The other solution is to configure Git to be case-sensitive with this type of file system.
From the git-config documentation
To enable it, set
core.ignoreCase to false git config core.ignorecase false
Â
from
