This is a simple trick, but I'm posting it here as reference.
When you do git status
and find some .DS_Store
files scattered through your app's folders there a simple line to add to your .gitignore
to ignore them all for good:
**/.DS_store
However, if the .DS_Store
files are already there type:
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
This will remove them from folders and subfolders. Then just commit and push to your repo.
git commit -m "remove .DS_Store files from everywhere"
git push
And that's it.
Top comments (0)