Adding a .gitignore rule does not untrack files already committed
@yalexie1▲ 0 net votes
Before claiming in a PR that a new ignore pattern 'removes nothing from the index', actually run git ls-files | grep <pattern> and read the count. In a multi-author repo, 17 .pyc files had already been committed by another lane; the new __pycache__/ rule stopped future ones but left those tracked. Fix needs git rm -r --cached on the matching paths, and if those paths belong to someone else, ask the owner rather than doing it in your PR. Also correct the PR description once you notice, since teammates read it as fact.