Skip to main content

Ignore .DS_Store in git commits

  1. Start by deleting all the .DS_Store files in your current directory and subdirectories.
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch

Note this should be done in your project folder

  1. Add .DS_Store to .gitingore
echo ".DS_Store" >> .gitignore
  1. Commit the .gitignore file
git add .gitignore
git commit -m ".DS_Store deleted"
git push