在分支中工作,尝试切换到主干线,我收到错误消息:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree checkout master
error: The following untracked working tree files would be overwritten by checkout:
LogLevels.cpp
Please move or remove them before you can switch branches.
Aborting
Completed with errors, see above
我创建了文件 LogLevels.cpp,我将它重命名为 logLevels.cpp(小写首字母),但不让 git 知道。现在我提交了分支中的所有更改,一切似乎都很好,但我无法回到主干。
我该如何解决这个问题?我尝试从目录和 git 中删除文件,然后从备份中复制它,但没有结果。