一、忽略
# 忽略当前文件
git update-index --assume-unchanged <filename>
# 取消忽略
git update-index --no-assume-unchanged <filename>
二、删除
# 1. 清理跟踪缓存
git rm --cached <filename>
# 2. 修改.gitignore
# 3. 提交
git commit -m "We really don't want Git to track this anymore!"