.gitignore is ignored by Git

前端 未结 30 1412
梦毁少年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条回答
  •  梦毁少年i
    2020-11-22 03:35

    Fixed. OK, I created the .gitignore file in Notepad on Windows and it wasn't working. When I viewed the .gitignore file on Linux it looked like organised gibberish - perhaps Notepad had written out Unicode rather than ASCII or whatever 8-bit is.

    So I rewrote the file on my Linux box, and when I pulled it back into Windows it works fine! Hurrah!

提交回复
热议问题