I am trying to push my repository that has a lot of .png
, .mp4
, .h5
files, that I can ignore.
the directory structure:
.gitignore
CV PROJECT
├───.vscode
├───Docker
├───src
│ ├───Game
│ ├───Main
│ │ └───__pycache__
│ └───Video
│ ├───Images
│ │ ├───test
│ │ │ ├───boost # dir that has .png files
│ │ │ ├───click # dir that has .png files
│ │ │ └───upgrade # dir that has .png files
│ │ └───train
│ │ ├───boost # dir that has .png files
│ │ ├───click # dir that, has .png files
│ │ └───upgrade # dir that has .png files
│ ├───Models # dir that has .h5 files
│ └───Videos
│ ├───boost # dir that has .mp4 files
│ ├───click # dir that has .mp4 files
│ └───upgrade # dir that has .mp4 files
└───Tutorial
└───.ipynb_checkpoints
tl;dr what does my .gitignore
need to look like?
the commands:
git config --global http.postBuffer 2048M
git config --global http.maxRequestBuffer 1024M
git config --global core.compression 9
git config --global ssh.postBuffer 2048M
git config --global ssh.maxRequestBuffer 1024M
git config --global pack.windowMemory 256m
git config --global pack.packSizeLimit 256m
# git hangs here
git push --verbose -f origin master
the output:
git hangs here:
Total 133 (delta 29), reused 0 (delta 0), pack-reused 0
POST git-receive-pack (569667108 bytes)
so i tried to ignore them using this .gitignore
:
*.mp4
*.h5
Models/*
Videos/*
test/*
train/*
boost/*
upgrade/*
click/*
and got this output:
remote: Resolving deltas: 100% (20/20), completed with 1 local object.
remote: warning: File src/Video/Videos/boost/b7.mp4 is 57.86 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File src/Video/Videos/click/c7.mp4 is 73.08 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File src/Video/Videos/upgrade/u6.mp4 is 56.50 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 3a803801864c0608c9e57dd7cf9d3ee3eaca6a180713b3c7119e8b0414c776ee
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File src/Video/medmodel.h5 is 112.78 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/romhayh/special-mario.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/romhayh/special-mario.git'
after this i converted the .gitignore
to .gitattributes
(to not use git lfs track
) and got the same error message:
remote: Resolving deltas: 100% (29/29), completed with 1 local object.
remote: warning: File src/Video/Videos/boost/b7.mp4 is 57.86 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File src/Video/Videos/click/c7.mp4 is 73.08 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File src/Video/Videos/upgrade/u6.mp4 is 56.50 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 9add1b6eba287591037b40a5a483a1b7bb9d2746853150a2146bdf83b8e58b9c
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File src/Video/Models/medmodel.h5 is 112.78 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File src/Video/medmodel.h5 is 112.78 MB; this exceeds GitHub's file size limit of 100.00 MB