Search code examples
gitmsys2

git msys2 git-lfs - cannot install git-lfs


I uninstalled git and all its dependencies

pacman -Rcns git

Then a system upgrade

pacman -Syu

I then installed git-lfs which re-installed git

pacman -S mingw-w64-x86_64-git-lfs

https://packages.msys2.org/package/mingw-w64-x86_64-git-lfs?repo=mingw64

But I get

$ git status
git-lfs filter-process: line 1: git-lfs: command not found
fatal: the remote end hung up unexpectedly

Check which packages with git in name are installed:

$ pacman -Q | grep git
git 2.37.1-1
mingw-w64-x86_64-crt-git 10.0.0.r54.gb4116e310-1
mingw-w64-x86_64-git-lfs 3.2.0-1
mingw-w64-x86_64-headers-git 10.0.0.r54.gb4116e310-1
mingw-w64-x86_64-libwinpthread-git 10.0.0.r54.gb4116e310-1
mingw-w64-x86_64-winpthreads-git 10.0.0.r54.gb4116e310-1

QUESTION
Why won't git-lfs install?


Solution

  • Here the steps

    In addition to steps in question above,

    Install git-lfs

    $ /mingw64/bin/git-lfs install
    Git LFS initialized.
    

    Now problem is that mingw64/bin is not in the path; I choose to copy git-lfs to where git is

    cp /mingw64/bin/git-lfs /usr/bin/
    

    Then do final step

    $ git lfs install
    Updated Git hooks.
    Git LFS initialized.