17
Jul
2026
Git: Remove cached files from Git repo
By Eric Downing. Filed in Uncategorized, Utilities |I was recently creating a git viewer in Python, I noticed that the cached files were showing up in the repo after my LLM process added all files. I need to remove them as I did not want to commit them to the repo.
git rm -r cached **/__pycache__/
If the “**” does not expand correctly in you prompt, then you may have to specify each root directory to be able to remove the cached files.
NOTE: make sure the cached argument is included or it may remove file syou wanted to keep.


