How to install Git Large File Storage on Windows?

11,596

The only reason why "git lfs" would not be a git command would be because the git-lfs.exe hasn't been put in your %PATH%.

That is what the git-lfs-windows-amd64-0.5.3\install.bat is supposed to do.

set GIT_LFS_BIN_PATH="%LOCALAPPDATA%\GitLFS\bin"
IF EXIST %GIT_LFS_BIN_PATH% GOTO DIRECTORY_EXISTS
mkdir %GIT_LFS_BIN_PATH%
set "path=%PATH%;%GIT_LFS_BIN_PATH:"=%"

So:

  • Make sure install.bat was successfully executed
  • Check the content of "%LOCALAPPDATA%\GitLFS\bin"
  • make sure to open a new CMD Windows
  • Check your %PATH% environment variable
Share:
11,596
laike9m
Author by

laike9m

Source: https://gumroad.com/l/OcGs

Updated on June 19, 2022

Comments

  • laike9m
    laike9m almost 2 years

    According to its doc, double-click should be enough. But when I opened git bash and ran git lfs init, it doesn't work:

    $ git lfs init
    git: 'lfs' is not a git command. See 'git --help'.
    
  • Nitay
    Nitay about 7 years
    This should either be in the git-lfs docs or added to the installer, as all Windows users encounter this.