How to install git-lfs on WSL2?

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

Installing git-lfs on kali or ubuntu is simple, but steps are not easy to find. In my case it was because I needed it for git subrepo

This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.
1 Answers

Run these in WSL

  1. sudo apt-get install git-lfs
  2. git lfs install

Readme

This is for using in WSL, if you want it on windows

  1. Download the windows installer from here
  2. Run the windows installer
  3. start a command prompt/or git for windows prompt and run git lfs install
Related