Git has a configuration setting that determines whether it treats the file system as case-sensitive or case-insensitive: core.ignorecase. To instruct Git to handle the file system as case-sensitive, simply set this option to false.
bashgit config core.ignorecase false
Note that setting this option to false on a case-insensitive file system is generally not advisable. This can result in unexpected errors. For example, renaming files solely by altering letter case may cause Git to report false conflicts or generate duplicate files.
Documentation
From the git config documentation:
core.ignorecaseIf set to
true, this option enables various workarounds that allow Git to function better on case-insensitive file systems (e.g., FAT). For instance, if the directory listing showsmakefilebut Git expectsMakefile, Git will assume it is the same file and continue to track it asMakefile.The default value is
false, butcore.ignorecaseis automatically detected and set totrue(if applicable) when creating a repository viagit-clone(1)orgit-init(1).