search

Home  >  Q&A  >  body text

coding - 运用git出现远程库多了一个本地不存在的文件

远程库有一个User.md和user.md文件,而本地是没有User.md这样文件的,为什么远程库那边却多了一个User.md文件?现在要怎么把远程库的User.md删除?只留下一个user.md文件?
补充一下,现在git pull的时候是显示already up-to-date

天蓬老师天蓬老师2769 days ago534

reply all(2)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-28 09:07:18

    MAC and Windows do not distinguish between upper and lower case of file names by default. User.md and user.md should be the same file.
    However, remote warehouses using Linux are case-sensitive.

    Try to set the local git to be case-sensitive, and then do it again

    git config core.ignorecase false
    

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-04-28 09:07:18

    It will be more troublesome if your file system (or Windows subsystem) is not case-sensitive. You can use the underlying git command to directly generate a commit with User.md removed and then push it up. Leave a message if necessary and I'll tinker with it when I have time.

    reply
    0
  • Cancelreply