Every so often when working with git repositories, I need to change the case of a filename. For example from File.yaml
to file.yaml
. Instinct is to simply rename the file in the terminal with mv, in File Explorer, or whatever IDE you’re using. After doing so, sure the filename did change but why is git not detecting this change?
Well this is likely because you are using a case-insensitive operating system, the most common being Windows and macOS.
The solution? From the terminal run:
git mv File.yaml file.yaml