pythongitpowershellcmdgit-filter-repo

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


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:

Any advice on what I'm missing please?


Solution

  • 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.


    As commented, there is now a git-filter-repo Homebrew formula, which offers an easier installation process on a Mac.