Skip to content

experience installing "git-filter-repo" script directly within bare windows environment #124

Closed
@t2t-paul

Description

@t2t-paul

completely understand if all of this is just inexperience on my part and no updates to the installation instructions etc. are required, but i wanted to share a little trauma i had getting this excellent tool to work in windows.

my previous environment:

  • windows 10 pro version "1909"
  • Git version "2.27.0.windows.1"
  • neither a "package manager" nor python itself (as far as i was aware - certainly not installed by me) previously installed

(1) i installed python itself from here:
https://www.python.org/downloads/release/python-383/
selecting the "Windows x86-64 executable installer" option

... thus followed various undocumented struggles getting anything to work ("permission denied" etc. messages) including at one point following the advice here and disabling the "app execution aliases" settings for "python.exe" within "windows" / "apps & features" settings

(2) i then started again with a fresh unedited "git-filter-repo" file which i extracted directly from the "git-filter-repo-2.27.1.tar.xz" file provided in the releases section of this repository, using "https://extract.me/" to extract those files (".xz" is not recognised as an archive container), and placing that git-filter-repo file in my "c:\Program Files\Git\mingw64\libexec\git-core" path (i.e. the path returned by "git --exec-path" as per the installation instructions on this repo)

using Git Bash within the folder for the local repository I was trying to filter I then ran my desired command:

git filter-repo --path "Floating Till"

RESULT: error issued by Git Bash /usr/bin/env: ‘python3’: No such file or directory

(3) changed first line of script to "#!/usr/bin/env python" as per the advice in the installation section of this repo

RESULT: error issued by Git Bash /usr/bin/env: ‘python’: No such file or directory

(4) changed first line of script to "#!c:\Users\[my windows user name]\AppData\Local\Programs\Python\Python38\python.exe" i.e. the path where I found "python.exe" to be installed when I file-searched my system

RESULT: error issued by Git Bash fatal: 'filter-repo' appears to be a git command, but we were not able to execute it. Maybe git-filter-repo is broken?

(5) re-enabled the "app execution aliases" settings for "python.exe" within "windows" / "apps & features" settings

RESULT: error issued by Git Bash Python was not found but can be installed from the Microsoft Store: ms-windows-store://pdp/?productid=9NJ46SX7X90P

(6) googled that product id "9NJ46SX7X90P" on the microsoft store and installed python 3.7 directly from there

RESULT: it worked

my own feeling / conclusion is that maybe this was a Git Bash issue, and also that the only way to get it to work was by downloading python from the microsoft store itself

again i am quite a novice at adding packages to Git, and anything at all to do with PYTHON / UNIX etc.: just posting my own experience in case that is relevant to the installation processes documented here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions