Git Can';t Rebase:合并将覆盖以下未跟踪的工作树文件

Git Can';t Rebase:合并将覆盖以下未跟踪的工作树文件,git,Git,我正在尝试重新设置分支的基础,并压缩大部分提交。当我这样做时,我会得到以下错误: error: The following untracked working tree files would be overwritten by merge: src/components/rtbDsp/RtbDspHeader.jsx src/components/rtbDsp/RtbDspManager.jsx Please move or remove them before you merge. Abor

我正在尝试重新设置分支的基础,并压缩大部分提交。当我这样做时,我会得到以下错误:

error: The following untracked working tree files would be overwritten by merge:
src/components/rtbDsp/RtbDspHeader.jsx
src/components/rtbDsp/RtbDspManager.jsx
Please move or remove them before you merge.
Aborting
hint: Could not execute the todo command
hint: 
hint:     squash cbb99a2a11499fb58a14241783d0d8fb1942a130 AM-485-dsps-edit fix case names
hint: 
hint: It has been rescheduled; To edit the command before continuing, please
hint: edit the todo list first:
hint: 
hint:     git rebase --edit-todo
hint:     git rebase --continue
Could not apply cbb99a2... AM-485-dsps-edit fix case names
我不知如何是好。我尝试删除这些文件,但在下一次提交时,它尝试重新设置基址。我试图删除提交,但得到了相同的错误


发生的情况是,文件已从“rtbDspManager”重命名为rtbDspManager。由于某些原因,这些文件被标记为未跟踪,但不再是未跟踪的。

听起来您的工作树可能位于不区分大小写的文件系统上,但您的repo可能没有配置为在这样的文件系统上工作的正确方式。如果是这样的话,通过设置core.ignorecase并重试重基,您可能会有更好的运气。看见但我希望大家谨慎行事。如果您处于这种情况,尤其是如果您不知道原因,那么在不区分大小写的环境中使用回购协议可能不安全。充其量,你应该仔细检查最终的回购协议,最坏的情况下,你可能只需要在不同的环境下工作envrionment@MarkAdelsberger是的,我正在开发MacOS,出现问题是因为它不区分大小写,当我将core.ignorecase更改为false,然后更改文件名,并提交给回购协议时,这就是在我的基础上失控的承诺。但在那之后有几十次提交,我不想失去所有的工作。