'How are git commands broken?

I installed git lfs from the website, then ran git lfs install and it said:

git lfs install
-->
fatal: 'lfs' appears to be a git command, but we were not
able to execute it. Maybe git-lfs is broken?

I tried uninstalling the lfs installer and re-installing, didnt change anything.

I'm on windows 10, WSL 2, Ubuntu 20.04.4

this is the website: https://git-lfs.github.com/



Solution 1:[1]

The website isn't very clear, but there's an extra step before calling git lfs install, fetching the installer and installing it! .. git lfs install appears to do some per-user setup after the extension itself is installed.

Download and install the Git command line extension. Once downloaded and installed, set up Git LFS for your user account by running:

git lfs install

You only need to run this once per user account.

(Emphasis mine)

You can find the installer either on the main page or for other operating systems on their downloads page

https://github.com/git-lfs/git-lfs/releases/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ti7