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

前端 未结 10 789
心在旅途
心在旅途 2021-02-07 19:40

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:32

    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.

提交回复
热议问题