git filter repo - Python was not found - but it's installed

二次信任 提交于 2021-02-08 09:54:42

问题


So I'm trying to use git filter-repo for the first time. I've installed Python 3.9. I try to run: git filter-repo --strip-blobs-bigger-than 100M

Each time it fails:

  • Git Bash: git: 'filter-repo' is not a git command.
  • Powershell: Python was not found;
  • CMD: Python was not found;

Any advice on what I'm missing please?


回答1:


Double-check the installation process on newren/git-filter-repo/INSTALL

You must make sure first (in a regular CMD) than git-filter-repo is in your %PATH%.
If you install it through pip, for instance, it should, since the Python folder should be added to your PATH at Python3 installation.

Once that %PATH% is correct (and you see git-filter-repo in it), then git will recognize the filter-repo command.



来源:https://stackoverflow.com/questions/65626875/git-filter-repo-python-was-not-found-but-its-installed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!