Author: Betty Godier | Twitter: @BettyGodier | Email: [email protected]
#Useful solution to Fix Git Problems with .DS_Store
1️⃣ Delete the existing files from the repository:
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
2️⃣ Add row
.DS_Store
to .gitignore file, which can be found at the top level of your repository (or created if it is not already there).
You can do it easily with this command in the top directory
echo .DS_Store >> .gitignore
3️⃣ then commit the .gitgnore file to the repository :
git add .gitignore git commit -m '.DS_Store banished!'