.gitignore is ignored by Git

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

    Mine wasn't working because I've literaly created a text document called .gitignore

    Instead, create a text document, open it in Notepad++ then save as .gitignore

    Make sure to pick All types (*.*) from the dropdown when you save it.


    Or in gitbash, simply use touch .gitignore

提交回复
热议问题