Sorry for the long post, but my two specific questions are in boldface in the text below.
I’m trying to learn how to use github with large (>100MB) files so I set up a test case to learn and experiment. I created a directory (named test) which contains a small text file, a large file, and a subdirectory which contains another large file. Both the large files are Photoshop files because that’s what was handy. My .gitignore file contains just the following:
# No emacs backup files anywhere **/*~
My .gitattributes file contains the following line (because both the large files have the extension .psd):
**/*.psd filter=lfs diff=lfs merge=lfs -text
With this preamble, I initialized the repository with “git init” and then gave the command (to verify everything was correct) “git add -n -v .” This yielded the following, which is exactly what I would expect:
add '.gitattributes' add '.gitignore' add 'bg.psd' add 'f1.txt' add 'sub/bgr1.psd'
Then I repeated that command without the “-n”, and followed up with “git commit” (provided the required comment in emacs). Then I created a private repository named test in my github account, and then gave the following commands:
$ git remote add origin https://github.com/<my-username>/test.git $ git push -u origin master
This resulted in git asking for my login credentials 3 times (why three times?), followed by:
Counting objects: 8, done. Delta compression using up to 32 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (8/8), 101.11 MiB | 2.13 MiB/s, done. Total 8 (delta 0), reused 0 (delta 0) remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com. remote: error: Trace: 131cc4912fd2a0290cbf90e4d77c2db1 remote: error: See http://git.io/iEPt8g for more information. remote: error: File bg.psd is 344.81 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: File sub/bgr1.psd is 148.98 MB; this exceeds GitHub's file size limit of 100.00 MB
Since I’ve specified in the .gitattributes file that files with an extension of “.psd” are large files, why would I get these errors? NOTE: I followed the instructions on this page: https://git-lfs.github.com/, and I installed lfs (in Ubuntu) with:
sudo apt-get install git-lfs
Thanks in advance.