Android Studio - git 本地更改文件列表 - 为什么忽略选项不可单击?

Android Studio - git Local Changes file list - why is ignore option not clickable?

为什么有时我可以右键单击并忽略文件但有时不能?

图像显示无法对所选文件执行忽略:

Android Studio 只是遵循 git 规则。 gitignore 用于尚未跟踪的文件(未添加到 git),在这里您试图忽略已跟踪的文件。
要停止跟踪,您应该使用 git rm --cached,请参阅官方 docs
我不确定使用 Android Studio git UI 是否可行。