When need to change path capitalization in git history, things get confusing b/c Mac/Linux file system treats upper and lowercase of a letter the same.
For example things get annoying when you try to change Models/cat.js
to models/Cat.js
.
It gets even weirder if you have a local Models/cats.js
file and the remote has models/cats.js
.
To get the git history synced between local and remote:
- Use
git ls-files
to see the different directories that the OS has consolidated into one. - Rename the directory that the OS has consolidated. In this case, "Models" -> "temp". This makes the OS move all those files to the directory together.