.gitignore is ignored by Git

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

    My problem was that I wrote down files to ignore with quotes " " separation not with slash /.

    This did not work and was ignored by git :

    "db.sqlite3"
    "tdd_venv/"
    

    This worked just fine :

    /db.sqlite3
    /tdd_venv/
    

    I also checked my file encoding in windows with Notepad++. Encoding was set to UTF-8.

提交回复
热议问题