I want to use git-filter-repo for my project to move multiple folders from one repository to a new repository. GIT documentation recommend to use git-filter-repo instead of git-filter-branch but I have never user Python before.
I installed the latest python (3.10.0) and GIT (2.33.1.windows.1).
I found the INSTALL.md instructions confusing so I've Googled and tried a few suggestions without much luck in getting this to work, but it seems something has happened and I'm not too sure how or what. I'm not sure what I should do next or if I'm using this correctly, I would appreciate some guidance.
I updated git-filter-repo first line to this #!/usr/bin/env python3
FYI: git --exec-path= C:/Program Files/Git/mingw64/libexec/git-core
I added the following to Path environment variable
- C:\Users{username}\AppData\Local\Programs\Python\Python310
- C:\Program Files\Git
- C:\Program Files\Git\mingw64\libexec\git-core
- C:\Users{username}\AppData\Roaming\Python\Python310\Scripts
I also moved git-filter-repo file into git's path location
I ran pip install (python/python3 didn't work but py did)
py -m pip install --user git-filter-repo
WARNING: The script git-filter-repo.exe is installed in 'C:\Users{username}\AppData\Roaming\Python\Python310\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed git-filter-repo-2.33.0
So I added the following to Path environment variable
- C:\Users{username}\AppData\Roaming\Python\Python310\Scripts
And ran py -m pip install --user git-filter-repo again
Requirement already satisfied: git-filter-repo in c:\users{username}\appdata\roaming\python\python310\site-packages (2.33.0)
I now get the following when I run git git-filter-repo in CMD
C:\Users{username}\bin>git git-filter-repo
git: 'git-filter-repo' is not a git command. See 'git --help'.
And in Gitbash I get this;
$ git-filter-repo
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
If I updated git-filter-repo first line to this #!/usr/bin/env py
And in gitBash when I run git filter-pro it spawns 100's of python.exe and kills the machine.
I've followed these posts
https://newbedev.com/how-do-you-install-git-filter-repo