gitignore just doesn't work. I can't get it to ignore .DS_Store & .gitignore files

前端 未结 10 1921
一整个雨季
一整个雨季 2021-02-07 20:12

I have .gitignored .DS_Store and .gitignore files. But still see them in the \"git status\".

Can someone explain to me how I can m

10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-07 20:21

    I had the same exact issue on Mac OS X. I had .gitignore file in the repo but it just won't work.

    What was weird when I wanted to print the .gitignore content to the console with the cat command it printed as it was empty. When opened with vim it appeared as normal.

    The solution was to remove the file, create a new one and put the content into it again. After that, ignoring files started to work and when I done cat .gitignore it printed properly.

提交回复
热议问题