git中忽略.DS_Store文件

苹果系统,在你没有屏蔽了.DS_Store ,每次打开文件就会生产.DS_Store,这样让我们很头疼:我们如何屏蔽.DS_Store呢?
我们用svn的时候 ,在我们最开始提交的时候,会发现.a文件,提不上去;我们去配置一下,将.a去掉后就可以,例如Cornerstone 如图在这里插入图片描述
现在是我们想不让.DS_Store提交 只要添加上就行了
git 具体操作如下 :
1、find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
删除项目中的 .DS_Store 文件
2、 echo .DS_Store >> ~/.gitignore
将 .DS_Store 加入到 .gitignore
然后就可以更新项目试试了

猜你喜欢

转载自blog.csdn.net/u013983033/article/details/83307726
今日推荐