如何解决git filter repo - 未找到 Python - 但已安装
所以我第一次尝试使用 git filter-repo。
我已经安装了 Python 3.9。
我尝试运行:
git filter-repo --strip-blobs-bigger-than 100M
每次失败:
- Git Bash:
git: 'filter-repo' is not a git command.
- Powershell:
Python was not found;
- CMD:
Python was not found;
对我遗漏的东西有什么建议吗?
解决方法
仔细检查 newren/git-filter-repo/INSTALL
上的安装过程
您必须首先(在常规 CMD 中)确保 git-filter-repo
在您的 %PATH%
中。
例如,如果您通过 pip
安装它,它应该,因为 Python folder should be added to your PATH at Python3 installation。
一旦 %PATH%
正确(并且您在其中看到 git-filter-repo
),那么 git
将识别 filter-repo
命令。
As commented,现在有一个 git-filter-repo
Homebrew formula,可在 Mac 上提供更简单的安装过程。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。