git中避免提交.DS_Store文件

1. 先删除原有的.DS_Store: find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch 命令解释:在当前文件夹以及当前文件夹的子文件夹中找到全部的.DS_Store文件,并将找到的文件经过管道传给xargs来处理。注意几个参数的理解: -print0:在find后不添加换行符(-print默认会添加换行符)
相关文章
相关标签/搜索