.gitignore is ignored by Git

前端 未结 30 1347
梦毁少年i
梦毁少年i 2020-11-22 02:51

My .gitignore file seems to be being ignored by Git - could the .gitignore file be corrupt? Which file format, locale or culture does Git expect?

30条回答
  •  既然无缘
    2020-11-22 03:27

    I've created .gitignore using echo "..." > .gitignore in PowerShell in Windows, because it does not let me to create it in Windows Explorer.

    The problem in my case was the encoding of the created file, and the problem was solved after I changed it to ANSI.

提交回复
热议问题