html文件命名不能大写,解决idea文件名称大小写导致GIT无法提交问题

0aa2b6992caba9c88cc6f577967be462.png

在创建文件的时候不小心将文件名大小写错了

例:

创建: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 ..." 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已经修复此问题

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值