nothing to commit, working tree clean

一、现象:

今天在git提交的时候有几个文件死活愣是提交不上去。

log如下

Commit failed with error
				0 files committed, 4 files failed to commit: *****
				On branch feature/*******
				Your branch is up-to-date with 'origin/feature/*******'.
				nothing to commit, working tree clean

意思很简单,没有找到能提交的东西。后来发现这几个文件都是我改了名字的,原来是**DTO,我改成了**Dto。

询问我们组长。

二、原因:

git默认配置为忽略大小写,因此无法正确检测大小写的更改

三、解决方法:

运行git
config core.ignorecase false,关闭git忽略大小写配置,即可检测到大小写名称更改