如何不更新 .gitignore ignore 檔案

Created · Updated

在使用 Agent 進行開發的時候,都會讓 Agent output 出檔案,進行記錄,不過並不想將這些記錄在遠端的 repo 中,也不想因為這些而修改 .gitignore。

修該 .git/ifno/exclude 可以在本地告訴 git 要 ignore 哪些檔案,適用於自己要 ignore 但團隊不一定有一起使用的時候,格式與一般的 .gitignore 一樣。

也可以使用 command:

git update-index --skip-worktree <file-list>