I installed git-filter-repo
via scoop
, tried multiple git filter-repo
commands e.g. git filter-repo -h
, they all logged nothing, no warning or error, just nothing.
Tried rebooting, reinstalling, and installing it on another Windows 10 computer, all reproduced it.
git-filter-repo
: v2.33.0
git
: v2.33.0.windows.2
python
: v3.9.7
scoop
:
Current Scoop version:
09200504 (HEAD -> master, origin/master, origin/HEAD) reset: skip when app instance is running (#4359)
'main' bucket:
b71f4a842 (HEAD -> master, origin/master, origin/HEAD) nunit-extension-vs-project-loader: Update to version 3.9.0
How to solve this issue?
(Now updated for newer Python installers.)
When I installed
git-filter-repo
on Windows earlier this year, the following steps worked for me:Download and install Python for Windows. In newer installers you need to go into the Advanced Options to make sure Python is added to your Path:
Confirm python was added to your path and that you can run either the command
python --version
orpython3 --version
from your Git command line. (I recommend Git Bash.) In my case, my executable name ispython
and if yours is too, you will need this in step #7 below.Clone git-filter-repo from GitHub.
Run the command
git --exec-path
to see your Git exe directory.From the
git-filter-repo
repo's root directory, copy the filegit-filter-repo
(about 160KB) into your Git exe directory.In your command line where you use Git, type the command
git filter-repo
. If it works, you should get the message "No arguments specified." and you can skip step #7. If it doesn't work, it's likely that your python exe ispython
instead ofpython3
as determined in step #2. Go to the next step.If you get no message or an error message similar to "/usr/bin/env: ‘python3’: No such file or directory", then edit the file
git-filter-repo
that you copied into your Git exe directory in step #5, and change the first line from "python3" to "python".Now be amazed at how fast and awesome
git-filter-repo
is.Still having problems? If you didn't add the environment variable in step #1, some people have had luck in step #7 by changing their python command to just "py". This is the python launcher which can auto-detect the highest version installed on your machine. More info here. I should point out that this did not work for me with python 3.10.7. I actually tried this first but ended up re-installing and enabling the option to "Add python to environment variables" as described above in step #1.