eTechtips

Tech Tips and Insights

Git: Remove cached files from Git repo

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.

Loading

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.