简体   繁体   English

git lfs 不是命令 Mac OS

[英]git lfs is not a command Mac OS

LFS git: 'lfs' is not a git command. See 'git --help'.

I am facing this issue on mac os.我在mac os上面临这个问题。 iit lfs command is working fine on terminal. iit lfs 命令在终端上运行良好。 But when I am running this command from some script it is trying to find the lfs command into the git this is what I understand so far.但是,当我从某个脚本运行此命令时,它试图将 lfs 命令查找到 git 中,这是我目前所理解的。

Please help me out in fixing this.请帮我解决这个问题。

  • Homebrew user run自制用户运行
brew install git-lfs
  • MacPorts user run MacPorts 用户运行
port install git-lfs

Verify that the installation was successful:验证安装是否成功:

$ git lfs install
> Git LFS initialized.

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

When using the apple xcode-provided git, in /usr/bin/git , and after installing the git-lfs download from https://git-lfs.github.com/ , you'll find git-lfs was placed in /usr/local/bin/git-lfs . When using the apple xcode-provided git, in /usr/bin/git , and after installing the git-lfs download from https://git-lfs.github.com/ , you'll find git-lfs was placed in /usr/local/bin/git-lfs You may need to add /usr/local/bin to your PATH so that git can find this.您可能需要将/usr/local/bin添加到 PATH 以便 git 可以找到它。 (I've not looked to see what brew and macports do) (我还没看过 brew 和 macports 做了什么)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM