In git ignore list I have:
build/**
.DS_Store
After updating some files git status shows:
modified: db/main/res/.DS_Store
I did not expect to show that .DS_Store
is modified because it is in ignore list. Working directory or project root is ~/myproj
.
How to fix this problem?
The ".DS_Store" entry in your .gitignore file will prevent new .DS_Store files being tracked by Git when you run git add
.
It sounds like the problem in your case is that the .DS_Store file was being tracked by Git before you included .DS_Store in the .gitignore file.
So all you need to do is remove the .DS_Store file from the repo with git rm --cached db/main/res/.DS_Store
and it won't be tracked from then on.
(added --cached following Edward's comment).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With