2019独角兽企业重金招聘Python工程师标准>>>
在创建文件的时候不小心将文件名大小写错了
例:
创建:A.html 并且已经加入本地索引
修改文件名:A.html 为 a.html
commit 报错:
Commit failed with error:pathspec 'test/a.html' did not match any file(s) known to git.
解决方法:
在命令行执行:
1. git status
On branch dev
Your branch is up-to-date with 'origin/dev'.Changes to be committed:
(use "git reset HEAD <file>..." to unstage)new file: test/A.html
2. git reset test/A.html
3. git add test/a.html
问题解决
参考:http://stackoverflow.com/questions/29485350/git-case-sensitivity-error-renaming-and-committing-from-android-studio/29485441#29485441
PS: 新版本IDEA已经修复此问题