I have a git repo that I have created locally and established a remote. I am trying to push the local repo to the remote for the initial commit. On my first commit I got an error message like this one:
$ git push -u origin master
Counting objects: 65, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (57/57), done.
Writing objects: 100% (65/65), 177.27 MiB | 9.18 MiB/s, done.
Total 65 (delta 6), reused 0 (delta 0)
remote: Resolving deltas: 100% (6/6), done.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 47ec2ee4640f0b04863b99c53fa03943
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File test_data/SoMa_DSM.tif is 399.73 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/username/VectorAttributes.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/username/VectorAttributes.git'
I added the the folder of the problem file to the .gitignore and then cleared my cache as described in this question: Apply gitignore on an existing repository already tracking large number of files However, I got the same error again.
Using git ls-files
displays, as I understand it, the files that have been committed locally and should be the only files that git is trying to push to remote. My problem file doesn't appear there but the error persists.
Why is git still trying to add that file to the remote repo even though it isn't in the local repo?