__pycache__ is Python’s bytecode cache (those .pyc files). It doesn’t belong in Git.
Ignore it first. Add to .gitignore:
**/__pycache__/
If you’ve already committed it, remove it from the index but keep local files:
git rm -r --cached __pycache__
git commit -m "Remove __pycache__ from version control"
git push
That stops tracking going forward. But if it’s deep in history, it still lives there. To purge history, rewrite it with BFG Repo-Cleaner (on Arch: yay -S bfg-repo-cleaner, otherwise grab the jar from the releases page):
bfg --delete-folders '__pycache__' --no-blob-protection
git reflog expire --expire=now --all
git gc --prune=now --aggressive
git push --force
--force rewrites remote history. If others collaborate on the repo, warn them first — don’t nuke their branches.