git filter repo - 未找到 Python - 但已安装

sps*_*suk 6 python git powershell cmd git-filter-repo

所以我第一次尝试使用 git filter-repo 。我已经安装了Python 3.9。我尝试运行: git filter-repo --strip-blobs-bigger-than 100M

每次失败时:

  • git 重击:git: 'filter-repo' is not a git command.
  • 电源外壳:Python was not found;
  • 命令:Python was not found;

请问我缺少什么有什么建议吗?

Von*_*onC 3

仔细检查安装过程newren/git-filter-repo/INSTALL

您必须首先(在常规 CMD 中)确保git-filter-repo您的%PATH%. 例如,
如果您通过安装它,则应该这样做,因为在安装 Python3 时应将 Python 文件夹添加到您的 PATH 中pip

一旦%PATH%正确(您git-filter-repo在其中看到),就会git识别该filter-repo命令。


正如所评论的,现在有一个git-filter-repoHomebrew 公式,它在 Mac 上提供了更简单的安装过程。