解決idea文件名稱大小寫致使GIT沒法提交問題

在建立文件的時候不當心將文件名大小寫錯了html

例:android

建立:A.html  而且已經加入本地索引git

修改文件名:A.html 爲 a.htmlandroid-studio

commit 報錯:spa

Commit failed with error:pathspec 'test/a.html' did not match any file(s) known to git.命令行

解決方法:htm

在命令行執行: blog

1. git status索引

On branch dev
Your branch is up-to-date with 'origin/dev'.it

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已經修復此問題

相關文章
相關標籤/搜索