首页 > 解决方案 > 如何在 WSL2 上安装 git-lfs?

问题描述

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

在 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.

标签: git-lfswsl-2

解决方案


在 WSL 中运行这些

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

自述文件

这是在 WSL 中使用的,如果你想在 Windows 上使用的话

  1. 从这里下载 Windows 安装程序
  2. 运行 Windows 安装程序
  3. 启动命令提示符/或 git for windows 提示符并运行 git lfs install

推荐阅读