.gitignore is ignored by Git

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

    As with the other solutions, commit first and be aware that you will lose any un-committed changes.

    I had better results with this:

    git rm -r --cached .
    git reset HEAD --hard
    git status
    

    Note that the status shouldn't have any modified files now.

提交回复
热议问题