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