.gitignore & .DS_Store
https://stackoverflow.com/questions/107701/how-can-i-remove-ds-store-files-from-a-git-repository
$ vi ~/.gitignore_global
# modify configs with below `ignore_macos.js` file
$ git config --global core.excludesfile ~/.gitignore_global
ignore_macos.js
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
$ find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch
echo ".DS_Store" >> ~/.gitignore_global
echo "._.DS_Store" >> ~/.gitignore_global
echo "**/.DS_Store" >> ~/.gitignore_global
echo "**/._.DS_Store" >> ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
#Ignore folder mac
.DS_Store
# OR
.DS_Store
._.DS_Store
**/.DS_Store
**/._.DS_Store
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!