Reputation: 1227
I found some similar questions with the same topic, but I could not resolve the problem with the them.
I am trying to push the existing repository to the github. There was some large files in the history that I removed with rm
. Then I found I should do this with git rm --cached file-to-remove.zip
. Now push try to upload those file and I get the following error.
Thank you for any guide.
$ git push -u origin master
Username for 'https://github.com': [email protected]
Password for 'https://[email protected]@github.com':
Counting objects: 4340, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2619/2619), done.
Writing objects: 100% (4340/4340), 286.38 MiB | 914.00 KiB/s, done.
Total 4340 (delta 1941), reused 3133 (delta 1416)
remote: Resolving deltas: 100% (1941/1941), done.
remote: warning: File functional_network/Wilson/human/data/png/movie.gif is 67.74 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: 7ea19eadcd6ce640e452630eab3b8f7f
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File DiGraph/wang-buszaki/Shivakeshavan/src/ttt is 134.33 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File WC/connectome/Hagmann_2008/graph/no_delay/CPP/data_txt/1/timeseriesE.txt is 135.50 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File WC/connectome/Hagmann_2008/graph/no_delay/CPP/data_txt/timeseriesE.txt is 135.49 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/Ziaeemehr/my_neural.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/Ziaeemehr/my_neural.git'
Upvotes: 1
Views: 631
Reputation: 4256
As you have already read in your error message:
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 7ea19eadcd6ce640e452630eab3b8f7f
remote: error: See http://git.io/iEPt8g for more information.
You might want to take a look at Git LFS, if you need to add larger files to your repository (Besides that I'm not sure why a gif gets larger than 60MiB)
If you are searching on how to remove that file, you might take a look at this well written GitHub Help page: Removing sensitive data from a repository. It describes how to use git filter-branch
to remove a file completely from your repository's history:
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch functional_network/Wilson/human/data/png/movie.gif' --prune-empty --tag-name-filter cat -- --all
Upvotes: 2
Reputation: 2521
That could be because your large files are still included in the previous commit. You could undo the commit and re-commit again or simply commit the current state of the repo, before trying to push again.
Upvotes: 0