Reproduced in: https://www.yangrunwei.com/a/52.html
Stepping on the git pit.
Under Windows, a coinlog.js file was submitted at the beginning, and later renamed to Coinlog.js, it was not submitted. Git hints are not changed. Later, it turns out that git is not sensitive to file name capitalization by default.
How to fix git file name capitalization problem scenario 1, configuring Git
The first thing you can do is to configure GIT to identify the case of file names. The command is as follows:
git config core.ignorecase false
The disadvantage is that each warehouse needs to be modified.
Scenario 2, Manual modification
1. First delete the target file stored in the Git local repository, take coinlog.js as an example
git rm coinLog.js
Or
git rm -f coinLog.js
-F means forced deletion.
2. Modify the file name
Modify the Coinlog.js file name to Coinlog.js
3. Add files to the local repository
git add coinlog.js
4. Submit to local warehouse and remote repository
git commit -m ‘rename file‘;
git push
Git file name capitalization issues