.gitignore & .DS_Store
.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 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/10540845.html
未经授权禁止转载,违者必究!