无法通过 git bash 提交更改,空提交消息

Unable to commit changes through git bash, empty commit message

我试图在 git bash 中提交一些项目更改。当我进入
git commit -m"my message"
我收到错误
Aborting commit due to empty commit message.

我尝试了 this post 的解决方案,但我仍然遇到同样的错误。

让我感到困惑的是我以前没有遇到过这个问题。 git commit -m"message" 在设备 #1 上运行良好。第二天,我在设备 #2 上工作,commit 命令开始工作了。同一天,我还在设备 #3 上工作,commit 命令没有问题。当我回到设备 #1 时,由于中止消息,我无法再提交任何更改。

希望这能解释更多。提前谢谢你。

在提到损坏的文件后,我发现问题出在 OneDrive 上。

并非我的所有 folders/files 都从 OneDrive 同步或加载到我的电脑。我将文件夹复制到物理驱动器并能够提交我的更改。

感谢您的帮助!