Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git lfs is not a command Mac OS

Tags:

git

git-lfs

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

I am facing this issue on mac os. iit lfs command is working fine on terminal. 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.

Please help me out in fixing this.

like image 215
Noman Maqsood Avatar asked Nov 11 '19 06:11

Noman Maqsood


People also ask

How do I download Git LFS on Mac?

Navigate to git-lfs.github.com and click Download. Alternatively, you can install Git LFS using a package manager: To use Homebrew, run brew install git-lfs . To use MacPorts, run port install git-lfs .

Is git LFS installed by default?

$ git lfs install Git LFS initialized. You'll only need to run git lfs install once. Once initialized for your system, Git LFS will bootstrap itself automatically when you clone a repository containing Git LFS content.


2 Answers

  • Homebrew user run
brew install git-lfs
  • MacPorts user run
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

like image 61
Max Peng Avatar answered Sep 18 '22 14:09

Max Peng


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. (I've not looked to see what brew and macports do)

like image 29
welch Avatar answered Sep 16 '22 14:09

welch