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

前端 未结 10 781
心在旅途
心在旅途 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:36

    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"
    

提交回复
热议问题