解决idea文件名称大小写导致GIT无法提交问题

 2023-09-05 阅读 98 评论 0

摘要:2019独角兽企业重金招聘Python工程师标准>>> 在创建文件的时候不小心将文件名大小写错了 例: 创建:A.html 并且已经加入本地索引 修改文件名:A.html 为 a.html commit 报错: Commit failed with error:pathspec 'test/a.html'

2019独角兽企业重金招聘Python工程师标准>>> hot3.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 <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已经修复此问题

 

 

 

 

转载于:https://my.oschina.net/wenjinglian/blog/746299

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/2/987.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息