-
问题描述:
在.gitignore中,和sourceTree的忽略文件中都添加了.DS_Store。但是每次更改,都有新的待提交 -
原因:
虽然已经忽略了.DS_Store。但是因为之前提交过,已经被Git追踪。所以忽略无效。
-
解决办法:
1.打卡终端,切到项目路径下,执行命令,删除git下的.DS_Store。
git rm --cached -r .DS_Store
2.填更新信息
git commit -m "Remove tracked .DS_Store files and ignore them"
3.推送到远程分支
git push
