Mac 系统永久删除 git 中的 .DS_Store 文件
参考链接:how-can-i-remove-ds-store-files-from-a-git-repository
-
找到已存在的 .DS_Store 文件并删除:
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
-
在 .gitignore 文件中添加一行:
.DS_Store
-
提交 .gitignore 文件
git add .gitignore git commit -m '.DS_Store banished!'
转载:https://blog.csdn.net/shfqbluestone/article/details/103146632