如何在 WSL2 上安装 git-lfs?

Aja*_*rge 5 git-lfs wsl-2

fatal: 'lfs' appears to be a git command, but we were not
able to execute it. Maybe git-lfs is broken?
Run Code Online (Sandbox Code Playgroud)

在kali或者ubuntu上安装git-lfs很简单,但是步骤不太好找。就我而言,这是因为我需要它用于 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.
Run Code Online (Sandbox Code Playgroud)

Aja*_*rge 20

您可以通过 Linux 发行版的包管理器在 WSL 上安装 git-lfs。例如,在 WSL 上的 Debian 或 Ubuntu 中,您可以输入:

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

自述文件

如果您想直接在 Windows 上安装 git-lfs:

  1. 从这里下载 Windows 安装程序
  2. 运行 Windows 安装程序
  3. 启动command prompt/or git bashfor windows 提示符并运行git lfs install