Git: fatal: will not add file alias xxx(XXX already exists in index)

Git: fatal: will not add file alias 'src/page/activity/christmas/ChristmasDialog/index.jsx' ('src/page/activity/christmas/christmasDialog/index.jsx' already exists in index)

  • 原因:因为改了文件名大小写导致的
  • 命令行输入 git config --get core.ignorecase,返回 true,默认忽略大小写
  • 找到 .git 文件夹下的 config 文件,修改代码 ignorecase = false,保存重启项目,提交代码

你可能感兴趣的:(Git: fatal: will not add file alias xxx(XXX already exists in index))