0

Ive tracked and commited some >100 MB files in my github repository and on push got the following error:

me@localhost:~/Workspace/bachelor/impl/joeynmt$ git push
Username for 'https://github.com': mygithubaccount
Password for 'https://mygithubaccount@github.com': 
Counting objects: 42, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (42/42), done.
Writing objects: 100% (42/42), 45.21 MiB | 944.00 KiB/s, done.
Total 42 (delta 24), reused 0 (delta 0)
remote: Resolving deltas: 100% (24/24), completed with 8 local objects.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 431986de647229f78a4dd06b227ff6eb
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File data/voc/myvocab.emb is 121.65 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/mygithubaccount/project
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/mygithubaccount/project'

I now added the folder containing this file to my .gitignore and did

me@localhost:~/Workspace/bachelor/impl/project$ git rm --cached data/voc/*
rm 'data/voc/myvocab.emb'
rm 'data/voc/myvocab.voc'

then committed and tried to push. To my understanding the problem should be solved as the files are no longer tracked. However pushing still results in the following Error:

me@localhost:~/Workspace/bachelor/impl/project$ git push
Username for 'https://github.com': mygithubaccount
Password for 'https://mygithubaccount@github.com': 
Counting objects: 45, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (45/45), done.
Writing objects: 100% (45/45), 45.21 MiB | 926.00 KiB/s, done.
Total 45 (delta 26), reused 0 (delta 0)
remote: Resolving deltas: 100% (26/26), completed with 8 local objects.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 744e97921c2e1ecc7ffb1385fa93ee3f
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File data/voc/myvocab.emb is 121.65 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/mygithubaccount/project
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/mygithubaccount/project'
infobox
  • 13
  • 1
  • 4
  • https://stackoverflow.com/search?q=%5Bgit%5D+remove+large+file+history – phd Mar 16 '20 at 21:00
  • 1
    An *untracked file* is a file that is in the work-tree but not in the index. But you don't `git push` the work-tree, nor the index: you `git push` *commits*. The file is in the commits. – torek Mar 16 '20 at 21:52
  • 1
    @phd that solved it, thanks. I did it with git filter branch – infobox Mar 16 '20 at 22:28

0 Answers0