git中避免提交.DS_Store文件

1. 先刪除原有的.DS_Store: find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch 命令解釋:在當前文件夾以及當前文件夾的子文件夾中找到全部的.DS_Store文件,並將找到的文件經過管道傳給xargs來處理。注意幾個參數的理解: -print0:在find後不添加換行符(-print默認會添加換行符)
相關文章
相關標籤/搜索