刪除項(xiàng)目中的所有.DS_Store肯尺。這會(huì)跳過不在項(xiàng)目中的 .DS_Store
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
將 .DS_Store 加入到 .gitignore
echo .DS_Store >> ~/.gitignore
更新項(xiàng)目
git add --all
git commit -m '.DS_Store banished!'