.gitignore is ignored by Git

前端 未结 30 1395
梦毁少年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:30

    It is also a possibility that you edited the .gitignore file with a sudo command. I encountered the same issue and while executing the commands: git status, I could still see the "should be ignored" files.

    Upon editing with nano .gitignore instead of sudo nano .gitignore, I could see the correct reflection.

提交回复
热议问题