Ignore .DS_Store in git commits

Categories: Programmering

  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

  2. Add .DS_Store to .gitingore

    echo .DS_Store >> .gitignore

  3. Commit the .gitignore file

    git add .gitignore
    git commit -m ".DS_Store deleted"
    git push