Installing git-filter-repo on windows

Installing git-filter-repo on windows

I've been trying to get git-filter-repo to work on Windows and WSL today and it's been quite a struggle. The docs are pretty limited and call out I may have to update some values in the script itself to make things work. But doesn't spell out what to fix and how to make it work.

I ended up doing the following:

1. Install Python on Windows

Install Python for Windows 3.10. And enable long-path-support. I did not use the store version, though it should do the trick as well.

2. Add Python to the path

Add the path to Python and its Scrips folder to the environment.

3. Install git-filter-repo using pip3

c:\> pip3 install git-filter-repo

And on WSL

1. Install Python on Ubuntu

sudo apt-get install python3

2. Install git-filter-repo using pip3

sudo pip3 install git-filter-repo

3. Add the correct folder to the path in fish

touch ~/.config/fish/config.fish 
echo "set -gx PATH \$PATH ~/.local/bin/" >> ~/.config/fish/config.fish

And be done with it!

It's probably not the Python way of doing things, but I can now use the tool I need. If you know a better way of solving this problem, let me know.