Git has a configuration setting that tells it whether to be case sensitive or insensitive:
core.ignorecase. To tell Git to be case-senstive, simply set this setting to
git config core.ignorecase false
git config documentation:
Internal variable which enables various workarounds to enable Git to work better on filesystems that are not case sensitive, like APFS, HFS+, FAT, NTFS, etc. For example, if a directory listing finds “makefile” when Git expects “Makefile”, Git will assume it is really the same file, and continue to remember it as “Makefile”.
Git relies on the proper configuration of this variable for your operating and file system. Modifying this value may result in unexpected behavior.
Dennis Otugo is a Consultant at Bantrain, and loves all things DevOps. In his role, he enables enterprise customers in their digital transformation journey and helps architect cloud-native solutions