git-lfs icon indicating copy to clipboard operation
git-lfs copied to clipboard

Git LFS is not recognized

Open pditommaso opened this issue 10 years ago • 6 comments

I'm just trying out Git LFS extension but I'm unable to have it working. I've installed using Homebrew, then in a test repository I've entered the following commands:

git lfs track "data/*.fastq"
git add data/SRR49336{6,7}*
git commit -m 'Adding data files'
git push

However the push complained that files were too big and suggested to use git lfs instead (!)

Writing objects: 100% (8/8), 32.13 MiB | 747.00 KiB/s, done.
Total 8 (delta 0), reused 0 (delta 0)
remote: warning: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: warning: See http://git.io/iEPt8g for more information.
remote: warning: File data/SRR493366.fastq is 51.94 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File data/SRR493367.fastq is 51.94 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
To [email protected]:pditommaso/test-lsf.git
   f5be9f4..e2024a5  master -> master

What's wrong?

You can find the repo here. This is my lfs configuration:

$ git lfs env
git-lfs/1.0.2 (GitHub; darwin amd64; go 1.5.1)
git version 2.6.3

Endpoint=https://github.com/pditommaso/test-lsf.git/info/lfs (auth=none)
  [email protected]:pditommaso/test-lsf.git
LocalWorkingDir=/Users/pditommaso/projects/test-lfs
LocalGitDir=/Users/pditommaso/projects/test-lfs/.git
LocalGitStorageDir=/Users/pditommaso/projects/test-lfs/.git
LocalMediaDir=/Users/pditommaso/projects/test-lfs/.git/lfs/objects
TempDir=/Users/pditommaso/projects/test-lfs/.git/lfs/tmp
ConcurrentTransfers=3
BatchTransfer=true
git config filter.lfs.smudge = ""
git config filter.lfs.clean = ""

pditommaso avatar Dec 04 '15 10:12 pditommaso

I'm having the same problem. It works for files placed in root but not for files placed in folders / directories. It's quite frustrating.

cipriantepes avatar Dec 04 '15 14:12 cipriantepes

@pditommaso You need to run git lfs install to set up the global git config. You can see this from the empty values at the bottom of the git lfs env output:

git config filter.lfs.smudge = ""
git config filter.lfs.clean = ""

I don't know if you got it working later, but this file is successfully stored with Git LFS: https://github.com/pditommaso/test-lfs/blob/be3d682f37f516aee43c133092bd518fe55b12fd/data/SRR493366.fastq

@cipriantepes: Can you file a new issue with details? If files aren't being added to Git LFS, and you've run git lfs install, it's possible that Git isn't matching the files up properly with the patterns in .gitattributes.

  • git lfs env
  • git lfs track

technoweenie avatar Dec 04 '15 15:12 technoweenie

@technoweenie I managed to make it work using github for windows and the Git Shell provided by that app. I wasn't able to install the standalone app from the site. The only file installed was git-lfs-uninstaller.exe - maybe because github for windows was already installed?

cipriantepes avatar Dec 04 '15 15:12 cipriantepes

The Git LFS installer looks for where you have Git For Windows installed. If you installed it to a custom directory, you'll have to tell that to the Git LFS installer too. Though if you use native tools like GitHub Desktop (and soon, SourceTree), you may be better off relying on them to install and update Git LFS.

technoweenie avatar Dec 04 '15 15:12 technoweenie

@technoweenie It defaults to desktop, not sure why. However, as long as it works in Git Shell, I'm good until I find what the problem could be.

Thanks!

cipriantepes avatar Dec 04 '15 16:12 cipriantepes

git lfs track now installs itself if it wasn't already, so this issue can be closed.

ttaylorr avatar Jul 07 '16 15:07 ttaylorr