Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git: 'lfs' is not a git command unclear

Tags:

git

github

Every time I enter in my command window

git lfs install 

the message I get is git: 'lfs' is not a git command. See 'git --help'.

I tried looking up for a solution, but none of the answers were clear. Can someone explain clear how to fix this?

like image 725
bockdavidson Avatar asked Feb 11 '18 17:02

bockdavidson


People also ask

How do I initialize git LFS?

To create a new Git LFS aware repository, you'll need to run git lfs install after you create the repository: # initialize Git $ mkdir Atlasteroids $ cd Atlasteroids $ git init Initialized empty Git repository in /Users/tpettersen/Atlasteroids/. git/ # initialize Git LFS $ git lfs install Updated pre-push hook.


2 Answers

It looks like you haven't downloaded git-lfs on your machine, so git lfs install isn't a registered command by git.

Install git-lfs as outlined below:


1. Pre-Requisites

  • git-lfs requires git version 1.8.2 or later. You can check the version you have by running git --version, and update if required.
  • If you are installing on macOS, make sure you have Homebrew installed.

2. Download

Download git-lfs by following the steps based on your operating system.

Debian / Ubuntu

$ curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash $ sudo apt-get install git-lfs 

MacOS (Using Homebrew)

$ brew update $ brew install git-lfs 

Windows

Download and run the latest windows installer.

3. Install

Finally, run git-lfs install to install git-lfs on your system. You can always run git-lfs uninstall to uninstall.


More detailed information (such as for installation on other platforms) can be found on git-lfs's installation page.

like image 108
aer Avatar answered Sep 21 '22 21:09

aer


You can't directly use

git lfs install 

Instead of that, you can use these commands to download and install (you have to download it before installing).

sudo apt-get install git-lfs git-lfs install 
like image 20
chamod rathnayake Avatar answered Sep 17 '22 21:09

chamod rathnayake