xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

.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

https://stackoverflow.com/questions/18393498/gitignore-all-the-ds-store-files-in-every-folder-and-subfolder


$ 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 发布文章使用:只允许注册用户才可以访问!


posted @ 2019-03-16 10:00  xgqfrms  阅读(434)  评论(2编辑  收藏  举报