git报错:fatal: will not add file alias '/a' ('/A' already exists in index)

250 阅读1分钟

当我在项目中通过git add .添加到暂存区时,报了以下错误:

fatal: will not add file alias '/PageLayout' ('/pageLayout' already exists in index)

原因:出现了大小写问题,但是其实我并没有修改这个文件或者文件夹的名字。我猜测可能是因为git版本或者操作系统版本等出现的问题。

解决方案:设置git config --global core.ignorecase false忽略大小写问题。