find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
//Add this line to the file .gitignore:
.DS_Store
//Create `.DS_Store` file in the root of the project.
echo .DS_Store >> .gitignore
//Commit file
git add .gitignore
git commit -m '.DS_Store banished!'