git lfs 不是命令 Mac OS

Nom*_*ood 13 git git-lfs

LFS git: 'lfs' is not a git command. See 'git --help'.
Run Code Online (Sandbox Code Playgroud)

我在 mac os 上遇到了这个问题。iit lfs 命令在终端上运行良好。但是当我从某个脚本运行这个命令时,它试图在 git 中找到 lfs 命令,这是我目前所理解的。

请帮我解决这个问题。

Max*_*eng 20

  • Homebrew 用户运行
brew install git-lfs
Run Code Online (Sandbox Code Playgroud)
  • MacPorts 用户运行
port install git-lfs
Run Code Online (Sandbox Code Playgroud)

验证安装是否成功:

$ git lfs install
> Git LFS initialized.
Run Code Online (Sandbox Code Playgroud)

有关更多详细信息,请参阅此文档:https : //help.github.com/en/github/managing-large-files/installing-git-large-file-storage


wel*_*lch 7

当使用苹果 xcode 提供的 git 时/usr/bin/git,在安装从 中下载的 git-lfs 后https://git-lfs.github.com/,你会发现 git-lfs 被放置在 中/usr/local/bin/git-lfs。您可能需要添加/usr/local/bin到您的 PATH 以便 git 可以找到它。(我没有看brew和macports做了什么)