mac git .DS_Store 文件

274 阅读1分钟

前言

在一个项目提交代码的时候看到了 .DS_Store 被修改了。之前没有遇到过这种情况,经查发现是 mac 对文件夹一些属性的定义

image.png

打开之后

image.png

解决方法

.gitignore 中添加 .DS_Store

.DS_Store

对比其他项目,发现其他项目有这个忽略。此项目是由多个项目构成的,根目录没有设置 .gitignore