.DS_Store ignoring https://stackoverflow.com/questions/18393498/gitignore-all-the-ds-store-files-in-every-folder-and-subfolder
I think the problem you’re having is that in some earlier commit, you’ve accidentally added .DS_Store files to the repository. Of course, once a file is tracked in your repository, it will continue to be tracked even if it matches an entry in an applicable .gitignore file.
You have to manually remove the .DS_Store files that were added to your repository. You can use
git rm --cached .DS_Store Once removed, git should ignore it. You should only need the following line in your root .gitignore file: .DS_Store. Don’t forget the period!
...