git commit提示Your branch is up-to-date with ‘origin/master‘.

时间:2024-05-20 07:59:44

在本地clone下码云的一个代码库之后,然后在这个目录下新建了两个空文件夹,

当使用 git commit -m 'commit'时,报如下 错误:

git commit提示Your branch is up-to-date with ‘origin/master‘.

原因:空文件夹下没有文件,在空文件夹下创建一个文本文件,再次提交,则没有问题。

git commit提示Your branch is up-to-date with ‘origin/master‘.

得出结论:git代码提交时,空文件夹提交不了,必须确保有真实的文件存在。