Reputation: 499
LFS git: 'lfs' is not a git command. See 'git --help'.
I am facing this issue on macOS. The git lfs
command is working fine from the Terminal. But when I am running this command from some script it is trying to find the lfs
command in git, and that is what I understand so far.
Please help me out in fixing this.
Upvotes: 40
Views: 54002
Reputation: 1015
Another way for the mac users who doesn't have brew, you can install git lfs using conda
conda install git-lfs
Upvotes: 1
Reputation: 670
If you aren't using MacPorts or Homebrew, there is an installer for macOS here:
Git Large File Storage
https://git-lfs.com/
sudo ./install.sh
That's pretty much it.
If you need a refresher on how to use:
# 1) Setup Git LFS on your system. You only have to do this once per user account:
git lfs install
# 2) Configure the file types or paths to be tracked using
git lfs track "*.bin"
# 3) Then just add the files as usual with git add command
# Tracked files can also be configured manually using the .gitattributes file
Upvotes: 3
Reputation: 964
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)
Upvotes: 7
Reputation: 3227
brew install git-lfs
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
Upvotes: 53