git清除__pycache__文件


第一步,清除已經存在的緩存文件

>> git rm -r -f --cached */__pycache__
rm 'common/__pycache__/__init__.cpython-37.pyc'
rm 'config/__pycache__/conf.cpython-37.pyc'
rm 'config/__pycache__/rule.cpython-37.pyc'
rm 'controller/__pycache__/__init__.cpython-37.pyc'
rm 'models/__pycache__/__init__.cpython-37.pyc'

第二步,設置.gitignore忽略 pycache

>> cat .gitignore
/.idea/
*/__pycache__/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM