0

I have a large TensorFlow model that I want to push to a GitHub repo. The file exceeds GitHub's size limit of 100MB.

I am trying to use Git Large File Storage, running the following commands:

brew install git-lfs

git lfs track "*.zip"

git lfs track "*.json"

git lfs track "*.h5"

git add .gitattributes

git add .

git commit -m 'adding git large file storage'

git push origin master

...but I still get the following error:

remote: error: File my_big_model.zip is 235.37 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: File tf_model.h5 is 255.54 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com. ! [remote rejected] master -> master (pre-receive hook declined)

I am running this inside GitPod.

Cybernetic
  • 12,628
  • 16
  • 93
  • 132

2 Answers2

0

You need to do

git lfs push --all origin master

before the git push origin master. What you're doing here is, pushing the files to LFS and pushing the pointers to GitHub. This might be helpful: Where are git-lfs files stored?

politecat314
  • 141
  • 1
  • 5
0

You should first push the .gitattributes to the git server and only then push the large files.

Omri
  • 887
  • 8
  • 24