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

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

    This is what your .gitignore should look like:

    .DS_Store
    

    Also, the .gitignore is meant to be tracked, ignoring it doesn't make sense. So after you've updated the file to contain just .DS_Store do:

    $ git add .gitignore
    $ git commit -m "Track .gitignore"
    

提交回复
热议问题