Files
team/memory/jj-untrack-ignored-files.md
2026-04-19 22:23:34 +08:00

636 B

name, description, type, originSessionId
name description type originSessionId
jj untrack 忽略已跟踪文件 jj 中 .gitignore 对已跟踪文件不生效,需用 jj file untrack 显式取消跟踪 feedback 9d4067bc-0888-4284-b2a7-cf3b0f392839

已加入 .gitignore 的路径如果在 jj 工作副本中已被跟踪(A 状态),.gitignore 不会生效。

Why: jj 自动快照工作副本,git rm --cached 的改动会被 jj 重新快照覆盖。jj 有自己的文件跟踪机制。

How to apply:

  1. 先确认路径已加入 .gitignore
  2. jj file untrack 'glob:<path>/**' 取消跟踪
  3. 验证 jj status 中不再显示该路径