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

前端 未结 10 1917
一整个雨季
一整个雨季 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:42

    1. You shouldn't ignore your .gitignore. I don't think the ignore feature works when you don't have it in your repository. I'm not sure though.
    2. Files that are already tracked won't be ignored, even if you add them to .gitignore. If you want them to be ignored after they've been added to the repository already, you have to remove them with git rm filename first.

提交回复
热议问题