Why does Git still show changes in a file I added to .gitignore?
TechnologyOur small project commits a generated preview file. It changes on every build and keeps cluttering the review. I added its name to .gitignore, but Git still reports it as modified. A teammate suggested trying broader wildcard patterns until it disappears.
Git's documentation says ignore rules apply to intentionally untracked files; files already tracked are unaffected. Git's ignore reference
How should we stop including this generated preview in future commits without deleting the working copy we need to view locally? I want to make the policy change deliberately rather than hide the symptom under increasingly broad patterns.