在Mac OSX上重命名文件并得到错误:以下未跟踪的工作树文件将被checkout覆盖:



我通过将名称更改为小写来重命名一些文件,最终得到以下错误消息:

git checkout feature/code-quality 
error: The following untracked working tree files would be overwritten by checkout:
src/assets/fonts/poppins-bold.ttf
src/assets/fonts/poppins-light.ttf
src/assets/fonts/poppins-medium.ttf
src/assets/fonts/poppins-regular.ttf
Please move or remove them before you can switch branches.
Aborting

之前是:

src/assets/fonts/Poppins-Bold.ttf
src/assets/fonts/Poppins-Light.ttf
src/assets/fonts/Poppins-Medium.ttf
src/assets/fonts/Poppins-Regular.ttf

我尝试了以下选项,但对我不起作用:git rm --cachedgit reset --hard HEAD

任何帮助都会很感激。谢谢。

尝试在OSX上设置git的case - ignore设置

git config core.ignorecase true

我希望,它会使你的一天。

最新更新