Add tracked file to .gitignore已被 Git 追蹤的檔案如何加入 .gitignore:本機用 git update-index --assume-unchanged,若有遠端同步還需執行 git rm --cached。1 git update-index --assume-unchanged <file> If there’s a remote server, also do:1 git rm --cached <file>